controlUI click when screen is off

Post your questions and help other users.

Moderator: Martin

Post Reply
yxd0018
Posts: 75
Joined: 05 Dec 2018 15:14

controlUI click when screen is off

Post by yxd0018 » 11 Jun 2019 10:19

Hi,
My flow launch an app, then use controlUI clickById to trigger a wifi sync. I find when screen is on, the flow works. But when I turn off the screen (not even locked) the flow runs but clickbyid has no effect. I insert wait after the launch app action but no effect. Do I have to turn on screen in order to use controlUI ? Thanks.

Pepy
Posts: 61
Joined: 31 Oct 2018 10:53
Location: Canada

Re: controlUI click when screen is off

Post by Pepy » 12 Jun 2019 07:48

Control UI essentially just manipulates elements in the same way you can for you, but if the screen is off, there is nothing visible to act on so you'll have to find another way to trigger the Wi-Fi sync. Maybe the app has a shortcut that you can use to trigger the Wi-Fi sync using the Launch Shortcut action?
Newbie to device automation! Hope my post was helpful, useful or informative :D
Device: OnePlus 5T (Dumpling) running crDroid 5.x, rooted via Magisk 8-)

yxd0018
Posts: 75
Joined: 05 Dec 2018 15:14

Re: controlUI click when screen is off

Post by yxd0018 » 13 Jun 2019 23:15

I thought just screen off while the graphic is still drawing. Now I make screen turn on to make it work as the app has no sub task to invoke. Thanks.

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

Re: controlUI click when screen is off

Post by Desmanto » 15 Jun 2019 16:37

That is control UI (or any accessibility based action/trigger) limitation. The feature only works when the screen is on and unlocked. Hence, you might need to the screen on, set the keyguard to off, do the control UI, then lock the phone again. However there is a risk to mis-touch the screen if it is inside the pocket. You can use a full screen widget, with clicked action to protect the screen. When you mis touch, it only touch the widget, not the UI underneath it, hence protected. After the Control UI finished, hide the widget.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190512, Pie 9.0, Rooted.

yxd0018
Posts: 75
Joined: 05 Dec 2018 15:14

Re: controlUI click when screen is off

Post by yxd0018 » 16 Jun 2019 13:44

Thank you so much.

Post Reply