class ApplicationCommands


Commands to be used on applications.

Summary

Public functions

Unit
amStartActivityIntent(intent: Intent, additionalArguments: String)

Starts an activity intent via am start shell command, using the intent uri as target.

Unit
clearAppData(packageName: String)

Clears the application data.

Unit
startApp(packageName: String)

Starts the application.

Unit
stopApp(packageName: String)

Stops the application.

Public functions

amStartActivityIntent

Added in 1.0.0-alpha03
fun amStartActivityIntent(intent: Intent, additionalArguments: String = ""): Unit

Starts an activity intent via am start shell command, using the intent uri as target.

Note that parcelables are not serialized in the URI and so will be ignored as part of the intent when calling this method.

Parameters
intent: Intent

activity intent to start.

additionalArguments: String = ""

additional arguments to pass to am start command, space separated, as these are passed to adb shell directly.

clearAppData

Added in 1.0.0-alpha03
fun clearAppData(packageName: String): Unit

Clears the application data.

startApp

Added in 1.0.0-alpha03
fun startApp(packageName: String): Unit

Starts the application. The first activity with category main and action launch is selected.

stopApp

Added in 1.0.0-alpha03
fun stopApp(packageName: String): Unit

Stops the application.