Condition - App Process Running

The condition App Process Running checks whether the process hosting an app is currently running.

Note: Android keeps processes in memory even when the process might not be required anymore and enough free memory is available.

Note: The official API used to access this information has been removed by Google on Android 5.1.1 which means that the condition is now marked as not officially supported.
Note: The unofficial workarounds to access this information don't work anymore on most devices running Android 7.

Settings
Package Name
The name of the process to check. Variables are supported.
A variable is a container for a value that can be used in many actions and conditions to dynamically define a part of a text.
See action Script for a description.

Supplied Variables
pid
the id of the process
importance (Android <5.1.1)
the importance of the process. The smaller the value the higher the importance.
lru (Android <5.1.1)
least recently used. Smaller value means more recently used.
process_state (not available on all versions of Android, Android <5.1.1)
State of the process (2=Process hosting the current top activities)
uid
the user id of the process