Question

I have some issue playing streaming* audio on a Galaxy Tab (works on HTC Desire HD and Nexus One). When I create the MediaPlayer object, it produces an error like this:

02-09 02:21:39.088: VERBOSE/MediaPlayer-JNI(9325): native_setup
02-09 02:21:39.088: VERBOSE/MediaPlayer(9325): constructor
02-09 02:21:39.088: VERBOSE/MediaPlayer(9325): setListener
02-09 02:21:39.092: INFO/MediaPlayer(9325): uri is:http://147.83.39.86:3200/osgi/files/TTS/1297185775715.ogg
02-09 02:21:39.092: INFO/MediaPlayer(9325): path is null
02-09 02:21:39.092: DEBUG/MediaPlayer(9325): Couldn't open file on client side, trying server side
02-09 02:21:39.092: VERBOSE/MediaPlayer-JNI(9325): setDataSource: path http://147.83.39.86:3200/osgi/files/TTS/1297185775715.ogg
02-09 02:21:39.092: VERBOSE/MediaPlayer(9325): setDataSource(http://147.83.39.86:3200/osgi/files/TTS/1297185775715.ogg)
02-09 02:21:39.092: ERROR/MediaPlayerService(2392): Failed to create player object
02-09 02:21:39.092: ERROR/MediaPlayer(9325): Unable to to create media player
02-09 02:21:39.104: DEBUG/MediaPlayer(9325): create failed:
02-09 02:21:39.104: DEBUG/MediaPlayer(9325): java.io.IOException: setDataSource failed.: status=0x80000000
02-09 02:21:39.104: DEBUG/MediaPlayer(9325):     at android.media.MediaPlayer.setDataSource(Native Method)
02-09 02:21:39.104: DEBUG/MediaPlayer(9325):     at android.media.MediaPlayer.setDataSource(MediaPlayer.java:745)
02-09 02:21:39.104: DEBUG/MediaPlayer(9325):     at android.media.MediaPlayer.setDataSource(MediaPlayer.java:675)
02-09 02:21:39.104: DEBUG/MediaPlayer(9325):     at android.media.MediaPlayer.create(MediaPlayer.java:611)
02-09 02:21:39.104: DEBUG/MediaPlayer(9325):     at android.media.MediaPlayer.create(MediaPlayer.java:592)
02-09 02:21:39.104: DEBUG/MediaPlayer(9325):     at com.vodafone.inredis.movil.interfazweb.InredisWebViewClient.shouldOverrideUrlLoading(InredisWebViewClient.java:37)

And this is how I create the MediaPlayer object, nothing weird:

Uri tempPath = Uri.parse(url);
player = MediaPlayer.create(interfazWeb, tempPath);
if (player != null){
  player.start();
} else {
  Log.e(TAG, "No se puede abrir el audio:" + url);
}
return true;

And to provide more information, I can say I tested the url passed, and I can download it with the native browser and play it normally. Obviously I can play it with my desktop browser.

Has anyboedy experienced this problem with the mentioned device?

Thanks in advance.

######## EDIT ##############

I haven't solved this issue yet, but I've been researching a bit, now I'm downloading the file in a separate thread, saving it to a temp file and opening with the MediaPlayer. It produces another kind of error, I'm suspecting of the file folders and permissions, but I'm not sure yet.

So now I have those temp files which I can play with the galaxy's native player, but not with the one I create in my code, and a different piece of log trace, which gives me no hint.

02-10 01:36:36.945: VERBOSE/MediaPlayer-JNI(8371): native_setup
02-10 01:36:36.945: VERBOSE/MediaPlayer(8371): constructor
02-10 01:36:36.945: VERBOSE/MediaPlayer(8371): setListener
02-10 01:36:36.948: VERBOSE/MediaPlayer-JNI(8371): setDataSource: path /sdcard/audioTmp360988.ogg
02-10 01:36:36.948: VERBOSE/MediaPlayer(8371): setDataSource(/sdcard/audioTmp360988.ogg)
02-10 01:36:36.952: VERBOSE/MediaPlayer(8371): prepare
02-10 01:36:36.952: ERROR/MediaPlayerService(2394): Client::notify In
02-10 01:36:36.952: ERROR/MediaPlayer(8371): message received msg=1, ext1=0, ext2=0
02-10 01:36:36.952: VERBOSE/MediaPlayer(8371): prepared
02-10 01:36:36.952: VERBOSE/MediaPlayer(8371): signal application thread
02-10 01:36:36.952: ERROR/MediaPlayer(8371): callback application
02-10 01:36:36.952: ERROR/MediaPlayer(8371): back from callback
02-10 01:36:36.952: VERBOSE/MediaPlayer(8371): prepare complete - status=0
02-10 01:36:41.437: VERBOSE/MediaPlayer-JNI(8371): native_finalize
02-10 01:36:41.437: VERBOSE/MediaPlayer-JNI(8371): release
02-10 01:36:41.437: VERBOSE/MediaPlayer(8371): setListener
02-10 01:36:41.437: VERBOSE/MediaPlayer(8371): disconnect
02-10 01:36:41.437: VERBOSE/MediaPlayer(8371): destructor
02-10 01:36:41.437: VERBOSE/MediaPlayer(8371): disconnect

Come on, I can't be the only one!

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top