launch

suspend fun launch(activity: String? = null, timeout: Duration = device.timeouts.lifecycle, extras: Map<String, Any> = emptyMap())(source)

Starts activity (or the launcher activity) with am start -W and returns when Android reports the launch complete. Nothing about the UI is assumed: wait for what the test needs (awaitVisible, awaitScreenStable, an element wait).

extras are put on the intent (am start --es/--ez/--ei/--el/--ef): values must be String, Boolean, Int, Long or Float, so getLongExtra needs a Long (42L). Anything else fails with IllegalArgumentException before the call.