I cannot kill another user background process using ActivityManager.killBackgroundProcesses .
Used code:
ActivityManager am = (ActivityManager)getSystemService(ACTIVITY_SERVICE); for (RunningAppProcessInfo pid : am.getRunningAppProcesses()) { if (pid.processName.equals("com.example.sample")) am.killBackgroundProcesses("com.example.sample"); }
Where com.example.sample is the background process package that I want to remove.
This process is still running in the background after that.
Kumar source share