Skip to main content

appState

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.

appState​

public Map<String, Object> appState(String app)

One app's state, for any app: state is not_installed, not_running, background or foreground. 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.

@param app the package name (Android) or bundle id (iOS) @return its state

Examples​

Ask whether an app is running​

Map<String, Object> state = device.appState("com.android.settings");
boolean running = !"not_running".equals(state.get("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