Hi folks,

Some time ago I posted an issue relating to an IllegalStateException
in the Media Player (http://groups.google.com/group/android-developers/
browse_thread/thread/46c7c2cd4f4a6958/5551d47aac93632c)

I have just launched the app into the "wild" and this error is
flooding in.

I just can't seem to fathom why.. here's the code:

if(mp != null) {
       mp.stop();
       mp.prepareAsync();
}

(mp is a MediaPlayer instance BTW).

According to the doco, prepareAsync is valid for {Initialized,
Stopped} states.. but I just can't see how it could be in any state
other than stopped??

The trace is:

java.lang.IllegalStateException
      at android.media.MediaPlayer.prepareAsync(Native Method)
      .. the line of code mentioned above follows.

Is it possible that stop() is not synchronous?  Can't seem to see
anything in the doco stating this.

Anyone got any ideas?

P.S.

I'm seeing this on a wide range of devices, but all so far are version
2.1-update1

-- 
Droid Odyssey!  A new game for Android
http://www.carboncrystal.com/droid-odyssey/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to