On Mon, Oct 11, 2010 at 3:35 PM, Nathan <critter...@crittermap.com> wrote:

> > > Will they close a program when not visible? This is the one I've seen.
> > Yes, but the platform will do that as well.  (And this is the only thing
> > that task killers can do as of 2.2)
> >
> The platform will do this, yes, but if I'm not mistaken it has a
> hierarchy to follow.
>

Sure.


> Let's say your activity starts a service. It's a well behaved service
> that places a foreground notification. A user leaves the activity to
> check the notification. The activity is paused and *boom*, the task
> killer kills the process because the activity is not visible. The
> notification will never be updated because the service is dead.
>

(a) If you are talking about a notification done with startForeground(),
then this tells the system the process is important to the user, so it will
try hard to kill it and will not let others kill it.

(b) Otherwise, this is a service running in the background, and it is not a
problem to kill it if memory is extremely tight.  Thus the system could kill
it as soon as you leave the app, and likewise task killers are allowed to
kill it as soon as it is such a candidate.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

Reply via email to