Clear all recents

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Rafi4
Posts: 229
Joined: 01 Dec 2017 05:23

Clear all recents

Post by Rafi4 » 22 Jan 2018 12:50

Hi
I want to create a flow to clear all recent apps before locking my device. Any help? How can I create?

User avatar
Desmanto
Posts: 2144
Joined: 21 Jul 2017 17:50

Re: Clear all recents

Post by Desmanto » 22 Jan 2018 15:53

It heavily depends on your phone. There are two ways to do it currently.
1. to use Control UI and automatically tap the recent button, such as in here. But you can't use the same script, it is different in each phone. You have to create it yourself using the overlay button in Control UI. This require accessibility and the screen on during execution.
2. Using root and dumpsys, to parse the recent menu and kill the app based on the parsed data. This of course require root and again you should suit to your phone and need.

I maybe can create the script or similar, but it most likely won't work at your phone. So it still need your own part.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

Post Reply