0

I am trying to develop "Recent Apps Kill" App. I am able to show the recent running apps. But I am not able to kill all running apps(which shown in recent task list).

I have tried/read:

 1. android:excludeFromRecents="true"
 2. android:noHistory= "true"

but these are for only current app(or same user id apps) not for other apps.

3. android.os.Process.killProcess(pid);//doesn't removed from recent list

4. activitymanager.killBackgroundProcesses(procInfos.get(pnum).processName);// not working
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Ritesh Bhavsar
  • 1,343
  • 1
  • 9
  • 19
  • So you're actively trying to reduce battery life? https://android.stackexchange.com/questions/91888/how-to-close-all-background-apps-at-once-in-android-5-0-lollipop – OneCricketeer Apr 21 '17 at 07:00
  • but i am trying it for learning purpose.. what about toddler lock app/Recent App Cleaner - Xposed? – Ritesh Bhavsar Apr 21 '17 at 07:08
  • I know those apps exist. If it's only a learning experience, I am sure I've seen over links mentioning the lines you have that "don't work" – OneCricketeer Apr 21 '17 at 07:12

0 Answers0