agent.actions.apps
ActionsLaunch 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.
| Parameter | Type | Description |
|---|---|---|
packageName | string | The app's package name (e.g., 'com.android.settings'). |
clearExisting? | boolean | Close 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.
| Parameter | Type | Description |
|---|---|---|
intentName | string | Action name (e.g., "android.intent.action.VIEW"). |
packageName | string | null | Target package name. |
data | string | null | Intent data URI. |
type | string | null | MIME type. |
extras | object | null | Extra data as key-value pairs. |
flags | number | Intent flags. |
component | "activity" | "service" | "broadcast" | Component type to launch. |
isDataLocal? | boolean | If 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.
| Parameter | Type | Description |
|---|---|---|
url | string | URL to open. |
clearExistingData? | boolean | Clear browser data before opening. |
Returns Promise<void> — Resolves when browser is launched.
Example
await agent.actions.browse("https://example.com");