01-16-2013 05:43 AM
I'm testing an Android to Blackberry 10 port on an application that uses the android.media.MediaPlayer to play streaming audio. When I launch the application and start playing the stream, it starts, but stops after less than a second.
Therefore, I checked the Unsupported API page (http://developer.blackberry.com/android/apisupport
Thanks for your help
Solved! Go to Solution.
01-16-2013 11:42 AM
Unfortunately "MediaPlayer.setAudioStreamType" is not currently support, but I'm not sure how that would effect your application if it started to stream, but than stop. Have you performed a verification of your application to make sure there are not any other other unsupported features that might be causing issues?
01-18-2013 01:54 PM
Thanks for your answer,
Indeed, this method doesn't seem to be the problem, since I made a small app that only reads one stream, and it works fine.
I'm trying to figure what difference is with the main application. The actual code to start the stream is the same :
I ran "Blackberry Tools / Verify apk" in my eclipse and Nothing is displayed after the check is done (I take it that it is a good sign ?)
01-21-2013 09:34 AM
Here's the solution, in case someone has the same problem :
After some testing, I have seen that the URL I get for the music stream returns an HTTP redirection (302).
When I use the final URL (after the redirection), the music plays fine, but if I use the original URL, the music plays for less than a second before stopping. I don't really understand why an HTTP redirection would make the MediaPlayer behave this way, but that is the problem when using the MediaPlayer on Blackberry 10.
By the way, the same URL with the original Android player works fine, so if some RIM developers see this, this should be checked in the Android wrapper on Blackberry 10. Thanks !