android - Killbackground Process actually killing the Process? -
i trying test answer question here while there no errors, tried see if kill process. did, set device run skype. run app, skype still there.
i wondering if there problems function wrote here?
thanks.
public void removeprocess() { activitymanager = (activitymanager) this.getsystemservice(activity_service); list<runningserviceinfo> taskinfo = am.getrunningservices(100); log.d("total_process", integer.tostring(taskinfo.size())); (int = 0; < taskinfo.size(); i++) { log.d("process_names", taskinfo.get(i).process); am.killbackgroundprocesses(taskinfo.get(i).process); } log.d("total_process", integer.tostring(taskinfo.size())); }
you can kill background process :
list<applicationinfo> packages; packagemanager pm; pm = getpackagemanager(); packages = pm.getinstalledapplications(0); activitymanager mactivitymanager = (activitymanager)this.getsystemservice(context.activity_service); (applicationinfo packageinfo : packages) { mactivitymanager.killbackgroundprocesses(packageinfo.packagename); }
but there many applications email, google maps instantly begin process of restarting, might possible skype doing
Comments
Post a Comment