Hello All,
I'm developing an application like an Task Killer, but not exactly.
My application needs to kill a specific process.
I'm using this code below to get the running processes:
Into each RunningAppProcessInfo, it has the PID.
I thought I could use this: Process.killProcess(info.pid);
But it only works to my own app or a process that was started by my application.
But I need to kill other processes from the list.
Someone else knows how can I kill any process?
Any Task Killer app does that, someone knows how they do it?
Thanks!
I'm developing an application like an Task Killer, but not exactly.
My application needs to kill a specific process.
I'm using this code below to get the running processes:
Code:
ActivityManager actvityManager= (ActivityManager) this
.getSystemService(ACTIVITY_SERVICE);
List<RunningAppProcessInfo> procInfos = actvityManager.getRunningAppProcesses();
Into each RunningAppProcessInfo, it has the PID.
I thought I could use this: Process.killProcess(info.pid);
But it only works to my own app or a process that was started by my application.
But I need to kill other processes from the list.
Someone else knows how can I kill any process?
Any Task Killer app does that, someone knows how they do it?
Thanks!