Page 1 of 1

Automated updating from Playstore

Posted: 07 May 2018 19:46
by digitalstone
I have been searching on this particular issue, found some clues but nothing particular.
Inside the Google Play Store app, inside the 3-stripes menu, you have the "My apps & games" button.
Once you click that, you have the option to "UPDATE ALL".
Now i would like to automate this with the Control UI (finally diving into it).

My issues are very noob-ish. Can't seem to do:

Code: Select all

click(75, 150); // Supposed to click the 3-stripe-menu
Not a single indication is showing of anything happening on opening the screen of the app.

Re: Automated updating from Playstore

Posted: 08 May 2018 15:05
by Desmanto
That 3 stripes menu (hamburger menu) is the navigation button. Should use clickById() for more reliability. click(x,y) is the last resort.
The next "My apps & games" can't be help, since it is a list, should use click(pattern).
Finally, if there are updates, the "Update all" button will be there, use its Id.

Summed up, this is the core script.

Code: Select all

sleep(1000)
clickById("com.android.vending:id/navigation_button");
sleep(500);
click("My apps & games");
sleep(1000);
clickById("com.android.vending:id/header_action_button");
I add sleep(1000) to ensure the script get enough time for the first launch, since playstore open quite slow in some devices.

You can add more check, using the existsById() to make sure the button is there (means there are updates). Or you can add additional notification trigger to check what apps got updated and log them sequentially to a list and report it after finish.

Re: Automated updating from Playstore

Posted: 08 May 2018 18:58
by digitalstone
Oh wait a minute, so controlling UI script is basically just "normal" script with the extra functions that apply only to UI-stuff?
I already did know that performing the click(x,y) method was kind of twonky, but i didn't know any form of reference like you showed me in your answer.
And so those references actually are the actual "path" (if i can call them that, kind of a Windows-term perhaps).

Interesting, i think i get it now :)
Thanks as always