I am developing an Android App that plays some sounds. For that I am creating an object of MediaPlayer. Below is the code:
mp = MediaPlayer.create(this, R.ra
It can happen that it returns null because the device doesn't support playing audio i.e watch.
null
watch
To check if device supports MediaPlayer you can do a null check on MediaPlayer.create()
MediaPlayer.create()
I found it on google santa-tracker app