forceStopPackage is equal to the restartPackage in Android 2.1
but in 2.2 you need
android.Manifest.permission.FORCE_STOP_PACKAGES, a system-
permission
so this method is not available to third party applications
On Jun 25, 10:04 pm, Happy C. taiwanhappin...@gmail.com wrote:
Thanks Dianne's reply.
What is the main difference between killBackgroundProcesses and
forceStopPackage?
or forceStopPackage is equal to the restartPackage in Android 2.1?
Thanks again.
On 6月25日, 上午8時26分, Dianne Hackborn hack...@android.com wrote:
Yes it is an internal API.
On Thu, Jun 24, 2010 at 4:13 PM, Happy C. taiwanhappin...@gmail.com wrote:
How does forceStopPackage work in Android 2.2 (Froyo)?
Thanks Google released 2.2 source code.
In this code-InstalledAppDetails.java
It shows how android 2.2 do the force close function.
private void forceStopPackage(String pkgName) {
ActivityManager am = (ActivityManager)getSystemService(
Context.ACTIVITY_SERVICE);
am.forceStopPackage(pkgName);
checkForceStop();
}
However forceStopPackage method is not in ActivityManager class.
http://developer.android.com/reference/android/app/ActivityManager.html
Is it a interneal API? Many 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.comandroid-developers%2Bunsubs
-cr...@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
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en