One, close yourself (process)
1. The use of stopping virtual machines (not recommended)
system.exit (0);
2. Using Google-provided APIs
android.os.Process.killProcess (Android.os.Process.myPid ());
Second, close other processes
        //1. Get the process registration
string Name = Etpackage.gettext (). toString (). Trim ();
//content
if (Textutils.isempty ( Name) {
toast.maketext (This, "Registration cannot be empty", 0). Show ();
return;
}
//invoke system service API kill process
//In this way, you can't kill yourself, or you can't kiii the critical process of the system
activitymanager manager = (Activitymanager) getsystemservice (Activity_service);
manager.killbackgroundprocesses (name);
This article is from the "Android Notes" blog, so be sure to keep this source http://2585211.blog.51cto.com/10044233/1673827
Android process (Close yourself and close other processes)