[android-developers] Re: How does forceStopPackage work in Android 2.2 (Froyo)?

2010-07-09 Thread Kid
"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."  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  wrote:
>
>
>
> > Yes it is an internal API.
>
> > On Thu, Jun 24, 2010 at 4:13 PM, Happy C.  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.com > >  -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


[android-developers] Re: How does forceStopPackage work in Android 2.2 (Froyo)?

2010-06-25 Thread Happy C.
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  wrote:
> Yes it is an internal API.
>
>
>
>
>
> On Thu, Jun 24, 2010 at 4:13 PM, Happy C.  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.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