Launcher

object Launcher

Functions

Link copied to clipboard

Returns all activities currently in the stack with their visibility state. Multiple activities can exist for the same package.

Link copied to clipboard

Returns all applications and their foreground state, reusing the activities function.

Link copied to clipboard
fun foreground(uiAutomation: UiAutomation, packageName: String): Boolean

Checks if the app with the given packageName is in the foreground, re-using the applications function.

Link copied to clipboard
fun installed(uiAutomation: UiAutomation, targetContext: Context, packageName: String): Boolean

Checks if the app with the given packageName is installed, according to launch intent retrieved by package manager.

Link copied to clipboard
fun label(instrumentation: Instrumentation, uiAutomation: UiAutomation, packageName: String): String?

Returns the application label of the given package

Link copied to clipboard
fun launch(instrumentation: Instrumentation, uiAutomation: UiAutomation, device: UiDevice, packageName: String, timeout: Long = 10000)

Launches the app with the given packageName if it's not running

Link copied to clipboard
fun running(uiAutomation: UiAutomation, packageName: String): Boolean

Checks if the app with the given packageName is running, re-using the applications function.