Page 1 of 1

Custom widget not "clickable".....

Posted: 21 Dec 2016 16:27
by Scotty
I have a flow that, when enabled, checks for a specific WiFi SSID every 15 seconds or so, and stops when connected. I've set it up so that every 15 seconds, it uses the action "Notification on Screen" to display a large on-screen notification (preferable to a status bar icon, because it's much easier to see at a glance, when driving). The on-screen notification is a custom widget - basically, a large box that says "Checking for {SSID}".

It works well. However, sometimes I want to stop the flow manually. Obviously, I know ways to do that, but the simplest seemed to me to be to make the custom widget clickable, so that, when the widget is displayed on-screen, I can tap ('click') it to stop the flow.

Problem is, the widget doesn't respond to a tap. Rather, whatever is BELOW the widget responds. I realize that this may be an OS limitation - perhaps on-screen notifications are "transparent" to touch events - but I wanted to post here so see if anyone knows of a way to make it work.

Re: Custom widget not "clickable".....

Posted: 21 Dec 2016 20:54
by Martin
Notifications shown with action Notification on Screen are not clickable by design.
You could use action Show Custom Widget Overlay and Hide Custom Widget Overlay to show/hide a clickable widget (ensure to select Clickable in the options).

Regards,
Martin

Re: Custom widget not "clickable".....

Posted: 21 Dec 2016 21:56
by Scotty
Many thanks for the quick & helpful reply, Martin. I've done as you suggested. I replaced the on-screen notification with:

Show custom widget overlay (clickable)
Sleep for 4 secs
Hide the overlay
Continue with the flow


and I set the custom widget's clickable action to Stop flow.

There was a slight problem though: tapping on the overlay did stop the flow - but it did so immediately, before reaching the "hide overlay" action. So the overlay remained on-screen, as a useless remnant of the flow. Easy enough workaround, of course, I just made a new flow which (i) stops the primary flow then (ii) hides the overlay, and I pointed the widget's clickable action to that new flow. Now, it's all excellent (indeed, better than before because now I have precise control of the time for which the widget is displayed, which wasn't possible using the on-screen notification).

Playing with Automagic is fun :-)

Happy holidays - Scotty