Block reference / App Management
App action
Open, force-stop or clear the data of an app, picked from one menu.
Only in
WarpX Phone
App action does what Start app, Stop app and Clear app data do, with the action chosen in the block instead of by which block you dragged in. Reach for it when you want one block whose action you can change later; for a flow that reads at a glance, the three single-purpose blocks say the same thing more plainly.
Settings
- Action
Open starts the app as tapping its icon does. Force stop stops it, as Force stop in the app's settings does. Clear data wipes everything the app stored on the phone, which signs it out.
ExampleForce stop- 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 (typingzalofindscom.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.shopee.vn- If the phone has not got itwhen Action is Open
What happens when the phone has not got the app. Fail — On error can branch on it fails the block with
APP_NOT_INSTALLED. Install it from the APK library installs the newest file the library has for that package, Install it from Google Play installs it from Play on the phone, and The APK library, else Google Play tries the library first and goes to Play only when the library has no file for it.ExampleFail — On error can branch on it- Update it first when there is a newer onewhen Action is Open
Before opening the app, puts a newer version on the phone when there is one: from the APK library, or from Google Play when that is the only source If the phone has not got it names. An app as new as the source's is left as it is.
ExampleUnchecked- Delay (ms)
A pause after the block finishes, before the next block starts. Write one number such as
1000, or a range such as1000,3000to 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 the package name, which the next block reads as {{prevBlockData}}. Leaves by its single output; a failure leaves by the fallback output when one is connected.
Example: Restart Shopee when it has stopped answering
- Start
- App action
- Delay
- App action
- Wait for element
- Add an App action block, set Action to Force stop and Package to
com.shopee.vn. - Add a Delay block of
2000ms so the app has fully closed. - Add a second App action block with Action on Open and the same package.
- Add a Wait for element block that waits for the home tab, so the next blocks start on a loaded app.
- Run it on the phone picked in the toolbar and watch Shopee close and come back.
Good to know
- Every action first checks that the app is on the phone; one that is not fails with
APP_NOT_INSTALLED, unless Open is set to install it. Open an app that has no icon to start from and the block fails withAPP_NOT_LAUNCHABLE. - Clear data fails with
CLEAR_FAILEDand the package manager's answer when Android refuses it. - Google Play is driven on the phone: WarpX opens the app's page in Play, presses Install (or Update) and Accept, and waits up to 10 minutes for the package to appear. It needs the phone signed in to Google and the WarpX agent, and takes free apps only. Play's answers fail the block by name:
PLAY_SIGNED_OUT,PLAY_PAID,PLAY_NOT_AVAILABLE(not for this phone),PLAY_UNAVAILABLE(no Play Store on the phone),PLAY_INSTALL_FAILEDandPLAY_TIMEOUT. - A workflow that was not edited on this computer asks you to allow this block before its first run when it clears data, or when Open may install or update the app. Opening and force-stopping never ask.
- The package must be a package name such as
com.shopee.vn, after references are filled in; anything else fails the block. - 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
- 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.
- Clear app data — Wipe everything an app stored on the phone, which signs it out.
- Is app open — Answer whether an app is on the screen, or running at all: true or false.