I am trying to remove all recent tasks through a program. Before posting a question, I googled it, but no luck at all.
I tried to use ActivityManager.killBackg
I just met with the same problem. My duty was to remove a 3th party app from recent list.
Okay, I don`t know how clear the recent list, but I know, how not to put your app there. start it with: FLAG_ACTIVITY_NO_HISTORY flag .
This worked for me, I hope I can help with it for you. details: min SDK level 14
Cheers,
REMOVE_TASKS
is a signature
-level permission. It can only be held by apps written by the developers of the device firmware, such as a device manufacturer or ROM mod author.
Try this out in android manifest inside the launcher activity:
android:excludeFromRecents="true"
In your AndroidManifest.xml
, you need to add this:
uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"