tags:

views:

130

answers:

3

Is there any difference between what happens when you use a Task Killer App to kill an app vs. what happens when the Android OS kills an app due to scarce resources?

The Android SDK says that the Application.onTerminate() method isn't called when the OS kills an app due to scarce resources. So it sounds like the OS doesn't cleanly close apps and that it does exactly what the much-debated task killers do.

If they do the same thing, then task killers don't do any more harm than the OS itself, right?

A: 

AFAIK by experience, when Android kills an application you can't count on it being killed cleanly (no calls to destroy methods). As for a task killer... well, I guess it depends on how a specific task killer is implemented.

Android does a great job managing resources on it's own, but a task killer can come in handy when you explicitly want to kill something. And to answer your question, I don't think a task killer does any more harm than when Android kills an application.

TomS
+1  A: 

Is there any difference between what happens when you use a Task Killer App to kill an app vs. what happens when the Android OS kills an app due to scarce resources?

A task killer nukes the app from orbit. It terminates the process, removes all alarms, removes all registered PendingIntents (e.g., for location updates), etc.

On the infrequent occasion where Android needs to terminate a process to free up RAM, it just terminates the process.

If they do the same thing, then task killers don't do any more harm than the OS itself, right?

No, task killers do a fair bit more harm to the app.

CommonsWare
+1  A: 

As of Froyo there is no difference. :) All a task killer can do is kill -9 a process when it is in the background, which is the same thing the OS does when it wants its memory. And yes, this is not a clean and orderly exit, it is a kill-the-process-dead-right-now. In fact on regular Android environments, Application.onTerminate() will never be killed; processes only go away by killing.

Prior to Froyo task killers had access to a different API -- "force stop" -- that allowed them to much more brutally stop all apps. This includes stopping any started services, removing any alarms that are registered, removing notifications, etc.

hackbod