It actually will be restarted after a timeout, even if it was killed to
reclaim memory.  (Actually the activity manager has no way to know why the
service's process disappeared.)  However if it is killed again soon after
restarting, the system will quickly increase the time it waits until it
tries to restart again.

And just generally, having a receive that runs for a little bit every 5
minutes is going to be *much* lighter on system resources than a service
that is always running and thus telling the system it should try to keep all
of the memory it is using committed to its process.

On Tue, May 3, 2011 at 4:48 PM, Igor Prilepov <iprile...@gmail.com> wrote:

> These are two opposite cases:
> 1. Your service is crashed (or killed) and Android tries to restart it
> after a certain timeout
> 2. On some conditions Android may decide to kill your service. Since the
> purpose of this action is to free some system resources it won't be
> restarted after a timeout.
>
>
>  --
> 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
>



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