Do you mean how to kill the service when you want to kill the process, that is , the host of service?
On Fri, Jul 30, 2010 at 11:15 AM, Dianne Hackborn <hack...@android.com>wrote: > Applications can't kill services with this. They can only kill background > processes, which the OOM killer is free to kill at any time anyway. > > > On Thu, Jul 29, 2010 at 6:37 PM, tomei.ninge...@gmail.com < > tomei.ninge...@gmail.com> wrote: > >> On Froyo, we found that some new "Task Manager" apps are now using the >> ActivityManager.killBackgroundProcesses() to kill apps. When this >> happens, Intent.ACTION_PACKAGE_RESTARTED is no longer fired. >> >> How can I find out that my application has been killed? >> >> I tried to start a service, and I do see this message printed in >> logcat: >> >> W/ActivityManager( 2426): Scheduling restart of crashed service >> com.example.android.apis/.app.RemoteService in 20000ms >> >> However, the service is never restarted as advertised, if the app is >> killed using the killBackgroundProcesses API. >> >> (If I go into adb shell and kill the service process, the service will >> indeed be restarted ...) >> >> This looks like a bug anyway, because the notification created by the >> app is no longer removed like in eclair (the StatusBarService, and a >> bunch of other system services, depend on the >> Intent.ACTION_PACKAGE_RESTARTED broadcast). >> >> Thanks >> >> -- >> 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<android-developers%2bunsubscr...@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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- 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