Android hacking : where is the methods/functions related to app killing -
if familiar android source code, me point out methods/functions related app/process killing used android?
a cross reference link best.
i found on stack overflow article. goes through list of running processes/apps , kills based on name:
string nameofprocess = "location"; activitymanager manager =(activitymanager)this.getsystemservice(context.activity_service); list<activitymanager.runningappprocessinfo> listofprocesses = manager.getrunningappprocesses(); (activitymanager.runningappprocessinfo process : listofprocesses) { if (process.processname.contains(nameofprocess)) { // ends app manager.restartpackage(process.processname); break; } }
you need following permissions:
<uses-permission android:name="android.permission.get_tasks" /> <uses-permission android:name="android.permission.restart_packages"/>
reference: how kill application using name?
Comments
Post a Comment