Our app uses this method to kill remote process; but can any other plan can be used? I need this because getRunningAppProcesses()
may not work.
public void killChildProcess() {
ActivityManager actvityManager = (ActivityManager)this.getSystemService( Context.ACTIVITY_SERVICE );
List<RunningAppProcessInfo> procInfos = actvityManager.getRunningAppProcesses();
for(RunningAppProcessInfo procInfo : procInfos) {
if (procInfo.processName != null &&
procInfo.processName.equals("package:remote")) {
Process.killProcess(procInfo.pid);
}
}
}
As suggested by @Matt Clark you can do like this
Check the process name contains
:remote
then go ahead.