On Nov 18, 1:55 pm, Cédric Berger <cedric.berge...@gmail.com> wrote:

> I meant not when the user requested it, but when the system went
> really too low on memory : as I understand the system  may eventually
> have to kill some services (even if it is not a full "force stop") ?
> (And if not, what happens when it is really too short on memory ?)

According to the API docs for android.app.Service (under Lifecycle)
the System can kill the Process that the Service is running in (and
thus the Service of course) on low memory conditions, but Services are
given a high priority to not be killed in this way and when it happens
the System "will later try to restart the service".   So that says the
System does NOT automatically stop Services per se, only processes.

My understanding (might be wrong) from earlier in this thread is that
Services can be restarted by alarms or by the system and this pressure
of too many Services trying to run is the source of the "thrashing"
that a user can resolve by using the new 2.0 stop-service UI since
then the system will NOT try to restart it (but an alarm might still
restart the service which might tick off the user who explicity
stopped it).  Also (I guess) a BroadcastReciever could be agressive
about restarting the Service when it receives a broadcast.

Interesting to see how all this plays with non-technically savvy users
who (we hope) will eventually be the vast predominance of Android
users.  Are they going to understand what to make of techy lists of
applications and services and how much RAM is in use, etc.  Or just
throw up their hands and blame the system?

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