Block reference / App Management

Is app open

Answer whether an app is on the screen, or running at all: true or false.

Only inWarpX Phone

Is app open tells whether an app is the one on the phone's screen right now, or, if you choose, whether it is running at all, in front or behind. It hands on true or false. Use it to notice that an app has crashed or been left, and bring it back with Start app.

TikTok has closed and the home screen is in front, so Is app open hands on false and the flow opens TikTok again.
The Is app open block's settings, filled in as in the example below.

Settings

Package

The app, by its package name, such as com.shopee.vn. As you type, the field suggests the apps on the phone picked in the editor's toolbar, the apps phone farms run most (typing zalo finds com.zing.zalo) and the packages the workflow already names; tick System apps in the list to include built-in ones. What you type is kept as typed, so a reference such as {{loopData.package}} works too.

Examplecom.zhiliaoapp.musically
Open means

On the screen now answers true only when the app is the one in front. Running — in front or behind answers true while the app's process is alive, even behind another app.

ExampleOn the screen now
Save the answer (true / false) to a variable

Also stores the answer, true or false, in a workflow variable. On for a new block.

ExampleChecked
Variable namewhen Save the answer (true / false) to a variable is on

The variable to write — appOpen for a new block. Later blocks read it as {{variables.appOpen}}, for example in a Conditions path. Left empty, nothing is written.

ExampleappOpen
Delay (ms)

A pause after the block finishes, before the next block starts. Write one number such as 1000, or a range such as 1000,3000 to pick a random pause in that range on each run.

Example0

Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.

What it hands on

Hands on true or false as {{prevBlockData}}, and writes it to the variable when asked. The block has one output, whatever the answer: branch on the variable with a Conditions block.

Example: Bring TikTok back if it has crashed

  1. Start
  2. Loop data
  3. Is app open
  4. Conditions
  5. Start app
  6. Swipe / Scroll
Where Is app open sits in the example workflow.
  1. Inside the loop that watches the feed, add an Is app open block with Package com.zhiliaoapp.musically and Open means on On the screen now.
  2. Leave Save the answer (true / false) to a variable on, with the variable appOpen.
  3. Add a Conditions block after it, with a path where {{variables.appOpen}} equals false.
  4. Connect that path to a Start app block for the same package, and on to the loop's next step.
  5. Connect the Conditions block's fallback path straight to the next step.

Good to know

  • An app that is not on the phone answers false, without an error.
  • The variable keeps the answer for later blocks; {{prevBlockData}} holds it only until the next block runs.
  • There is no Device field: the block acts on the run's phone — the one picked in the editor's toolbar, or each phone ticked for Run automation in the Control Center or named in an API run.

See also

  • Is app installed — Answer whether an app is on the phone: true or false.
  • Start app — Open an app by its package, installing it first if the phone has not got it.
  • Stop app — Force-stop an app, as Force stop in its settings does.
  • Conditions — Send the run down one of several paths, depending on values, page elements or code.