App task ended variables

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

App task ended variables

Post by MURTUMA » 15 Apr 2015 15:48

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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: App task ended variables

Post by Martin » 15 Apr 2015 18:49

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.

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: App task ended variables

Post by MURTUMA » 15 Apr 2015 20:42

Thanks! That solution works well.

Locked