controlUI click when screen is off

Post your questions and help other users.

Moderator: Martin

Post Reply
yxd0018
Posts: 85
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: 76
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?
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

yxd0018
Posts: 85
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: 2709
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), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

yxd0018
Posts: 85
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