You may check out the Service Lifecycle at http://developer.android.com/reference/android/app/Service.html
Assuming you are going to use the Context.startService() call to start the service (As against using the Context.bindService() call), the service will stay up and running till you call Context.stopService() from the activity or stopSelf() from within the Service code. Also, irrespective of how many times you call startService, the stopService call will stop the service. Hope this helps, Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jun 11, 10:24 pm, shiv <shivmo...@gmail.com> wrote: > Hi All, > I have one activity which call service to pay audio. Once > service start playing audio i will close my activity.Now again i will > start activity now i need to stop the playing auido. > > Problem is how to keep the instance of mediaplayer after closing the > activity ? which we need for stopping the audio. > > Thanks for help in advance. > > Regards, > Shiv --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to android-framework@googlegroups.com To unsubscribe from this group, send email to android-framework+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---