Automated updating from Playstore

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
digitalstone
Posts: 342
Joined: 21 Oct 2017 12:36
Location: The Netherlands

Automated updating from Playstore

Post by digitalstone » 07 May 2018 19:46

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.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)

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

Re: Automated updating from Playstore

Post by Desmanto » 08 May 2018 15:05

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
digitalstone
Posts: 342
Joined: 21 Oct 2017 12:36
Location: The Netherlands

Re: Automated updating from Playstore

Post by digitalstone » 08 May 2018 18:58

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
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)

Post Reply