07.02.2011 9:53, Amit пишет:
As Kostya wrote: I should be considering that service may be killed in
extreme condition if OS think.
And not only under extreme conditions. Recent versions of Android are
more proactive about removing unneeded background services, AFAIK that's
where you see "No longer want <service name>" in the log cat.
You can tell the framework that your service is doing something
important and should not be killed by calling startForeground (and
stopForeground when done). Those are Android 2.0 API methods.
This is exalained here:
http://android-developers.blogspot.com/2010/02/service-api-changes-starting-with.html
Another option is to make it so that your service can handle being
killed and resume what it was doing when restarted.
-- Kostya
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
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