I don't know why you'd specific ask Google engineers to answer this
question. There are plenty of non-Google people who also have some
detailed understanding about the way Android works.

You're seeing situations where the visible activity takes so much
space that the system has to start killing processes that contain
services.

onLowResources() is called when disk resources are getting low, which
isn't the case here. Since the kill is done directly by the kernel
(and happens synchronously within the kernel), there is no opportunity
to call onDestroy() on your code.

I'm not 100% sure about auto-restarting the service, but not
auto-restarting it gives it the opportunity to decide whether to
restart itself or not based on the conditions (e..g network
availability).

JBQ

On Thu, Dec 11, 2008 at 6:55 AM, b2amedina <[EMAIL PROTECTED]> wrote:
>
> My application has a remote service always running in the background
> and Android apparently kills and re-creates it randomly. I know
> Android can does this but the behavior I am seeing is odd.
>
> I log out messages when onLowResources and onDestroy are invoked. When
> this condition occurs these methods are not called. There is also
> nothing in logcat from either my application or the operating system.
> I just see my service go from one PID to a new PID.
>
> Android does recreate my service (onCreate is invoked) but does not re-
> start it (onStart is not invoked) even though it was started when it
> was killed.
>
> I added code in my service to handle this situation but my question is
> if this is normal behavior (i.e. not calling onDestroy and not
> restarting the service) or an Android bug?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to