Page 1 of 1

controlUI click when screen is off

Posted: 11 Jun 2019 10:19
by yxd0018
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.

Re: controlUI click when screen is off

Posted: 12 Jun 2019 07:48
by Pepy
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?

Re: controlUI click when screen is off

Posted: 13 Jun 2019 23:15
by yxd0018
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.

Re: controlUI click when screen is off

Posted: 15 Jun 2019 16:37
by Desmanto
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.

Re: controlUI click when screen is off

Posted: 16 Jun 2019 13:44
by yxd0018
Thank you so much.