On Tue, Jun 15, 2010 at 3:10 PM, Happy C. <[email protected]> wrote:

> Does the "Force stop" in the setting of android 2.2 also use
> "KillBackgroundProcess" or use the system level API (developer can't
> use directly) to make it?
>

Force stop uses the brutal real force stop mechanism that is no longer
available to third party apps.


> I have tried the "KillBackgroundProcess" and adding the related
> permission, but it can't stop the running app either or  running
> service like "Force stop" does.
>

Correct, it can't kill processes that the system would not normally be free
to kill for out of memory reasons -- that is it only kills background
processes or processes running services, which can be killed without the
user being aware that something happened.

If it killed a foreground process running an activity, for example, this
would lose the current state of the activity causing it to disappear.

"Force stop"  and my  "KillBackgroundProcess" seems to have sent the
> same signal 9. but they behave differently.
> I don't know why it doesn't work in my  "KillBackgroundProcess".
>

Force stop does a lot more than just killing processes.  (Which is one of
the reasons the task killer apps' abuse of it has caused so many problems.)

-- 
Dianne Hackborn
Android framework engineer
[email protected]

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

Reply via email to