I've got a music player service which should keep on playing in
background.

So I did:
- add android:process=":remote" in the manifest
- return START_STICKY in onStartCommand (because MediaPlayer does the
work until the track is finished)
- invoke startForeground when Activity becomes invisible (onPause) and
music is playing

But Android kills my service nontheless, often immediately after
unbindService (the notification icon is shown and instantly removed
again), sometimes a bit later, sometimes not at all, and according to
a few users sometimes even while it's bound. Free memory doesn't seem
to matter. Strangely, it seems to have gotten much worse with a recent
update even though I didn't modify anything related (just a couple of
small fixes in methods not even invoked in my tests).

Any idea what could cause Android to kill the service and how to avoid
it? (No, there's no task manager running...)

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