Page 1 of 1

Active Flow Widget

Posted: 09 Oct 2013 19:43
by derekb
Is it possible to create a widget that shows which flow is currently active? If so, some direction would be appreciated. Thanks!

Re: Active Flow Widget

Posted: 10 Oct 2013 15:47
by pat2net

Re: Active Flow Widget

Posted: 10 Oct 2013 15:55
by Martin
You could add an action Script as a first action to your flows and write the name of the flow to a global variable:
-action Script: global_flow = flow_name
The variable flow_name contains the name of the currently executing flow. The script assigns the flow name to the global variable global_flow which can be accessed by a custom widget.

Then use a custom widget to display the content of the global variable. To do this, add a text element to a custom widget and set the text to {global_flow}.
The widget tutorial uses a similar approach to show the battery level: Creating a Custom Widget.

Re: Active Flow Widget

Posted: 10 Oct 2013 17:04
by derekb
Cool. That works great. Love this app.