You can't get that state directly, but you can infer what state the MediaPlayer is in by whether or not you have successfully called the methods you need to call to get into a state. For example, if you call MediaPlayer.setDataSource(), and it succeeds, then you will be in the correct state for calling prepare(), and if you then call prepare(), and it succeeds, you will be in the PREPARED state.
On Tue, Apr 28, 2009 at 6:22 PM, westmeadboy <mjc1...@googlemail.com> wrote: > > No, I mean the states described in the documentation: IDLE, > INITIALIZED, PREPARED etc > > At the moment, I do not know whether I can call prepare without > getting an exception. prepare() can only be called in certain Valid > states. > > On Apr 29, 12:00 am, Marco Nelissen <marc...@android.com> wrote: > > What do you mean by that? If you want to know if it's playing, call > > MediaPlayer.isPlaying(). If you want to know how far along it is, call > > MediaPlayer.getCurrentPosition(). Are those kinds of things you're > looking > > for, or something else? > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---