I have a strange problem when playing music files with the mediaplayer.
The playback starts without any problems and everything works fine. The app doesn’t crash. But everytime I select a song I get the following LogCatError:
11-18 16:26:19.800: E/MediaPlayer(11367): setDataSource JAVA path
11-18 16:26:19.800: E/MediaPlayer-JNI(11367): setDataSource: outside
path in JNI is ?x@11-18 16:26:19.855: E/MediaPlayer(11367): In prepareAsync
11-18 16:26:20.005: W/MediaPlayer(11367): info/warning (1, 44)
I don’t download the files from the internet, I just play the songs stored on the device.
If nobody could give me a solution, it would be nice if anybody could explain the error to me.
Use try catch around you mediaplayer datasource, like this:
You have to catch all Exceptions.
This worked for me.