I think I just solved it by calling setForeground(true). I wonder how I missed it in the API reference :P
On Jul 30, 9:15 pm, Farhan <russ...@gmail.com> wrote: > Hello, > > I am playing an audio file of about 1 minute length in a Service. I > used startService method yet when I move away from the activity which > starts the Service, playback stops after few seconds. If I stay with > the Activity then I can listen to the whole audio. I thought playing > an audio file in service will allow my application to play something > in the background. Can anyone tell me what I am doing wrong? > > Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---