On Thu, May 21, 2009 at 9:41 PM, iDeveloper <[email protected]> wrote:
> Hi > > I am using a MediaPlayer instance in order to stream audio files from an > Internet location. The audio player is in a separate activity. The user can > select from a list of audio files and come to this activity which plays the > audio. > > Now the user might go back to the previous activity (with the list) and > select another audio file. In this case, I want to stop any other audio that > is playing and start playing the new audio which was selected. > > Is there any way I can know whether an audio file is playing without having > to hold on to the MediaPlayer object? > No, and you *should* hold on to the MediaPlayer object, because if you don't, it can be garbage collected at any time, at which point playback would stop. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

