Skip to main content

Contexts

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

List the automatable contexts on the device: the native shell plus any debuggable WebViews. These call app_contexts.

Contexts​

func (d *Device) Contexts(ctx context.Context) ([]string, error)

Contexts lists the automatable contexts: the native shell plus any WebViews.

Examples​

List the native app and its WebViews​

names, err := dev.Contexts(ctx)
if err != nil {
return err
}
fmt.Println(names) // [NATIVE_APP WEBVIEW_...]

The same call from the command line, mobium contexts, printed on an Android 15 emulator:

NATIVE_APP (current)
WEBVIEW_dev.mobium.mobiumapp — about:blank about:blank

mobium contexts on an Android 15 emulator

mobium contexts on an Android 15 emulator