Page 1 of 1

App task ended variables

Posted: 15 Apr 2015 15:48
by MURTUMA
I have a flow which toggels something off when I open specific apps and then on when I close the app. The app list is not constant, I have to change them from time to time and thats why I tried to write the flow in a way which aliminates the need of editing as much as possible.

The flow:

Trigger1: app task started; (com.app1, com.app2, etc)
Trigger2: app task ended; {global_package_name}
Condition: app task running, most recent; {package_name} //this works good and eliminates one place to edit
False: Toggle off
True: Toggle on
After toggle on I use action: script; global_package_name = {package_name}

The trigger2 never fires. There are no typos and variable values is correct.

EDIT: I noticed the said trigger does not support variables according to the help file. Seems like this topic can be moved to feature requests forum.

Re: App task ended variables

Posted: 15 Apr 2015 18:49
by Martin
You could also use * in trigger App Task Ended to react to all apps and then use a condition Expression: package_name==global_package_name to check for your particular app. (I will update the documentation of trigger App Task Ended where the pattern information is missing).
Support for variables in more triggers should become available at some point in the future but it will still take some time.

Re: App task ended variables

Posted: 15 Apr 2015 20:42
by MURTUMA
Thanks! That solution works well.