The only reason that your playback continues in the background is because
you're not stopping it, and the system hasn't garbage collected your
MediaPlayer object yet.
If you want to do reliable background playback while your UI exits, you will
have to do this in a service.


On Sun, Feb 1, 2009 at 4:04 AM, [email protected] <
[email protected]> wrote:

>
> I'm using a mediaplayer to play a sound file, when you leave the
> application the sound continues in the background, which is the
> desired behaviour.
>
> However, when the app is resumed, the mediaplayer isn't retrieved, so
> hitting pause just starts a new player so now there are two sounds
> playing.
>
> Is the mediaplayer a type of service? How can I access the original
> player again?
> >
>

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

Reply via email to