Clean recent app

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
polispolis
Posts: 3
Joined: 24 Feb 2016 16:39

Clean recent app

Post by polispolis » 24 Feb 2016 16:45

Hello, can you I create clean recent app, of course automagic, so through root command. Thanks.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Clean recent app

Post by Martin » 25 Feb 2016 19:33

Hi,

I'm not aware about a command to clear all recent apps in one go.
You could use Control UI to open the recent apps and to simulate tapping the dismiss button of each app. This will take some time to close all apps when many apps are open. Some ROMs have a button to clear all, you could simulate tapping this button on such a ROM.

Regards,
Martin

polispolis
Posts: 3
Joined: 24 Feb 2016 16:39

Re: Clean recent app

Post by polispolis » 27 Feb 2016 10:07

Can you make one example ample, in my device after have open recent panel, I can close all recent app, through vertical swiping. Thanks @Martin

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Clean recent app

Post by Martin » 27 Feb 2016 10:18

Swiping is not supported with Control UI (you could use Execute Root Command: input swipe <x1> <y1> <x2> <y2> to simulate a swipe).
On a Nexus with Android 6, following script works:

Code: Select all

recents();
sleep(2000);
while (click("Dismiss*))
{
   sleep(500);
}
The script opens the recent apps then waits until the dismiss buttons become visible and then clicks the dismiss-buttons until the click fails (no app available anymore).
It's quite slow when you have man apps open.

polispolis
Posts: 3
Joined: 24 Feb 2016 16:39

Re: Clean recent app

Post by polispolis » 27 Feb 2016 22:46

Do not work this script, after not open neither recent app

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Clean recent app

Post by Martin » 28 Feb 2016 11:02

Do you get an exception/crash or does it simply not do anything? What version of Android are you using, custom ROM? Is the Automagic accessibility service enabled (action Control UI should show a hint if it's not enabled)?

Are you using other apps that use such an accessibility service? If yes, you might have to change the Accessibility Feedback Type in the settings of Automagic to a value that is not occupied by another app.

Post Reply