1

I am currently designing an android application that incorporates radio streaming. The app works as it should with devices below Android 2.2, but works slowly if the device is 2.2 or above. I am using the MediaPlayer object, and I am calling the 'setDataSource(mylink.com/radio.mp3)' method as well as the 'prepare()' method. The problem seems to occur when the MediaPlayer is being prepared. It just takes a very long time to ready itself for the play state. And again, this issue doesn't arise on devices below Android 2.2. Any ideas?

7
  • You could always take a look at the different versions of Android and see what they have done thati s different.
    – hwrdprkns
    Commented Jun 20, 2011 at 21:11
  • Are you comparing only different versions of Android or is it also different devices ?
    – Matthieu
    Commented Jun 20, 2011 at 21:41
  • Also, does it take longer on 2.2+ if you're using local files, or only while streaming?
    – Geobits
    Commented Jun 21, 2011 at 7:05
  • I am comparing both versions and devices. The problem occurs on all the devices (and emulators) of versions 2.2 and higher I have checked thus far excluding the galaxy tab, which was version 2.2. Seems to run normally on that device.
    – javaTheHut
    Commented Jun 21, 2011 at 12:58
  • As far as local versus streaming. I can play a local file without delay but I can also play a stream that has finite length without delay. I feel the problem occurs when I am streaming from a source without a specified length. Is there a way to overcome this?
    – javaTheHut
    Commented Jun 21, 2011 at 13:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.