foreground

suspend fun foreground(timeout: Duration = device.timeouts.lifecycle)(source)

Brings the app to the front the way the launcher does: its launcher intent with NEW_TASK | RESET_TASK_IF_NEEDED, so a running task resumes where it was instead of gaining a second copy of the launcher activity, and a stopped app starts. Returns when am start -W reports the launch complete; wait for the screen you need.