Is there any difference between Android Application Settings -> Force Stop & Stop Process under Eclipse? -


i have developed simple background service, tries prove self resistance when app killed. purpose return in onstartcommand - start_sticky - obvious !

when i'm testing killing service's process either:

  1. from application settings -> force stop
  2. or under eclipse ddms perspective stop process...

i noticed in 1st scenario service never restarted. on other hand in 2nd scenario service re-created , oncreate method called...

why that? differences in killing processes these 2 approaches?

any differences in killing processes these 2 approaches?

yes. in ddms, "stop process" kills process. "force stop", not only process killed, moved "stopped" state, nothing in app run again until manually runs 1 of app's components (typically: user launches activity home screen).

you can read more stopped state in the android 3.1 documentation.


Comments