I didn't realize it wouldn't return the media player until it was ready to
play.

Now the methods in media player make much more sense.  I was wondering why
there wasn't a way to create a new media player object with the new keyword,
then set the resource id.

Thanks!


On Mon, Mar 2, 2009 at 12:03 AM, Marco Nelissen <marc...@android.com> wrote:

>
> On Sun, Mar 1, 2009 at 8:45 AM, Paper Coder <paperga...@gmail.com> wrote:
> > So if I load a large sound from a resource, is there any way to tell if
> it's
> > ready to play?  I wish there was an isPrepared method for media player.
> As
> > it stands now there seems like there's no way to know for sure.
>
> Of course there is: prepare() and MediaPlayer.create() are
> synchronous, so when those return your MediaPlayer is ready to play.
> If you're using prepareAsync(), then you should set an
> onPreparedListener before calling prepareAsync, and that listener will
> be called when the MediaPlayer is ready for playback.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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