[Example] Action On Active App

by Gustavo Delgado (Freakassee)

Version 1 (July 19, 2016)

Download (174 downloads)

Very simple example on how to perform actions based on whether a predetermined app is active or not.

With this you could for example automatically turn on GPS when you open Google Maps and turn it of when it is no longer in the foreground.

How it works:
• when foreground app
Checks whether the app defined under "Package" is running in the foreground or not. By using "when changed" for Proceed we avoid running innummerable loops per minute in the background.
• is screen brightness
Reads the current brightness settings and saves them into variables for actual brightness and adaptive brightness.
• set screen brightness
"Yes" fiber: Sets brightness to 100%.
"No" fiber: Reverts changes back to values before app came into foreground by applying the variables.

By default this flow will check for Automate. Since a change is necessary for the fiber to proceed, as previously explained, remember to open another app once after activating, since Automate will be in the foreground already.

5.0 average rating from 1 reviews

5 stars
4 stars
3 stars
2 stars
1 star

Reviews and ratings can be submitted in the app.