launch
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Bring an app to the foreground, starting it if it is not running. These call app_launch.
launch
def launch(app: str, hit_test: bool=False, gray_box: bool=False) -> None
Bring an app to the foreground by package name or bundle id.
Every ref from the previous screen is discarded — call map(), or just act, since actions re-resolve their target anyway.
hit_test, on an iOS simulator, loads the hit probe into the app as
it launches: every action on an element in it then asks UIKit where
the touch goes first, and is refused when it would land elsewhere. A
real iPhone and Android refuse it.
gray_box launches the app with Mobium's gray-box library
turned on: the app says when it is busy, and every action waits for
it to be idle before finding its target. It needs an app built with
the library.
Examples
Bring an app to the front
device.launch("com.android.settings")
The same call from the command line, mobium launch com.android.settings, printed on an Android 15 emulator:
launched com.android.settings

mobium launch com.android.settings on an Android 15 emulator
Launch an app with the gray box on, so every action waits for it to be idle
device.launch("dev.mobium.mobiumapp", gray_box=True)
The same call from the command line, mobium launch --gray-box dev.mobium.mobiumapp, printed on an Android 15 emulator:
launched dev.mobium.mobiumapp, with the gray box: every action waits for the app to say it is idle