after android2.2, if the service added start itself in OnDestroy, with kill backgroudprocess usually cannot end themselves. There is a newly discovered method that uses reflection to call Forcestoppackage to end Process method Forcestoppackage = Am.getclass (). Getdeclaredmethod ("Forcestoppackage ", String.class); forcestoppackage.setaccessible (true); Forcestoppackage.invoke (AM, yourpkgname); Need to add shareduid definition in manifest android:shareduserid= "Android.uid.system" plus permission <uses-permission android:name= " Android.permission.FORCE_STOP_PACKAGES "></uses-permission> with system platform signature because Force_stop_packages permissions are required, This permission is only given to the system signature level program can be implemented to force stop the specified program there is also a way to take advantage of the Linux kill-9 command I also see on the Internet, specific can not, you try it
Reference: http://blog.csdn.net/Zengyangtech/article/details/5733631
End the entire application process
Activitymanager manager = (Activitymanager) getsystemservice (Context.activity_service);
Manager.killbackgroundprocesses (Getpackagename ());
Android How to end a process, I tried to use the Activitymanager.killbackgroundprocesses method to end, but no response