Skip to content

agent.actions.apps

Actions

Launch apps, manage intents, and browse URLs.

Access these methods through agent.actions. Launch and manage applications on the device.

launchApp

Signature
launchApp(packageName: string, clearExisting?: boolean): Promise<void>

Launches an app by its package name.

ParameterTypeDescription
packageNamestringThe app's package name (e.g., 'com.android.settings').
clearExisting?booleanClose the existing app before launching. (default: false)

Returns Promise<void>Resolves when app is launched.

Example
await agent.actions.launchApp("com.android.settings");
Launch with fresh data
await agent.actions.launchApp("com.example.app", true);

launchIntent

Signature
launchIntent(intentName: string, packageName: string | null, data: string | null, type: string | null, extras: object | null, flags: number, component: "activity" | "service" | "broadcast", isDataLocal?: boolean): Promise<void>

Launches an Android Intent with full configuration options.

ParameterTypeDescription
intentNamestringAction name (e.g., "android.intent.action.VIEW").
packageNamestring | nullTarget package name.
datastring | nullIntent data URI.
typestring | nullMIME type.
extrasobject | nullExtra data as key-value pairs.
flagsnumberIntent flags.
component"activity" | "service" | "broadcast"Component type to launch.
isDataLocal?booleanIf true, data is a local file path.

Returns Promise<void>Resolves when intent is launched.

Open a URL
await agent.actions.launchIntent(
  "android.intent.action.VIEW",
  null,
  "https://example.com",
  null, null, 0, "activity"
);

listApps

Signature
listApps(): Promise<{[packageName: string]: string}>

Gets a list of all installed apps.

Returns {[packageName: string]: string}Object mapping package names to app display names.

Example
const apps = await agent.actions.listApps();
console.log(apps["com.android.chrome"]); // "Chrome"

browse

Signature
browse(url: string, clearExistingData?: boolean): Promise<void>

Opens a URL in the default browser.

ParameterTypeDescription
urlstringURL to open.
clearExistingData?booleanClear browser data before opening.

Returns Promise<void>Resolves when browser is launched.

Example
await agent.actions.browse("https://example.com");