Skip to main content

app_state

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

What state one app is in: not_installed, not_running, background or foreground — for any app, where app_current names only the one in front. These call app_state.

app_state​

def app_state(app: str) -> dict

One app's state: not_installed, not_running, background or foreground, for any app.

An app under its own permission prompt is still in front, and covered_by names the prompt's process. On iOS a background app also has suspended.

Examples​

Ask whether an app is running​

state = device.app_state("com.android.settings")
print(state["state"])

The same call from the command line, mobium state com.android.settings, printed on an Android 15 emulator:

com.android.settings is in front