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
appState(app: string): Promise<Data>
One app's state: not_installed, not_running, background or foreground.
Examples
Ask whether an app is running
const { state } = await device.appState('com.android.settings')
console.log(state) // 'foreground', 'background', 'not_running' ...
The same call from the command line, mobium state com.android.settings, printed on an Android 15 emulator:
com.android.settings is in front