Page 1 of 1

[Ask] Counting App on Recent List

Posted: 01 Aug 2015 17:21
by Diantokam
hi all,

anyone here can help me how to count how much app in recent list?

i'm using command recents() to show all recent app list

just need to count how much app in the list


thank you

Re: Counting

Posted: 02 Aug 2015 01:35
by Diantokam
any help.... please

Re: [Ask] Counting App on Recent List

Posted: 02 Aug 2015 05:04
by bogdyro
Are you using action control ui to display the recents menu? I don't think there's anyway to count the number of items displayed. What are you trying to accomplish?

Re: [Ask] Counting App on Recent List

Posted: 02 Aug 2015 09:57
by Diantokam
i'm trying to clear app list, i need to stop the flow if there is no app on the list, list is empty while flow still running.

i don't know how to create condition so the flow stop after all app on the list is closed.

Thank You.

Re: [Ask] Counting App on Recent List

Posted: 03 Aug 2015 18:49
by Martin
Hi,

I'm not sure if there's a way to get the number of apps in the recents list, maybe with trigger UI Event, but it could be tricky.
On a regular Lollipop recents list (Google ROM) you could click the dismiss buttons as long as the click function returns true which means that the button was successfully clicked.
A script in Control UI could look like this (timing might need some adjustments):

Code: Select all

recents();
sleep(2000);
while(click("Dismiss *"))
{
    sleep(1000);
}
Regards,
Martin

Re: [Ask] Counting App on Recent List

Posted: 04 Aug 2015 15:23
by Diantokam
Hi Martin,

thank you, i'm using android 4.2.1 Jelly bean, and my display is 5 inch.

and here is my flow, it worked BUT not perfect because i can't set up condition based number of app oj recent list.

Please see it, thank you.

i'm sorry i can't upload xml file