Skip to content

agent.actions.navigation

Actions

Device navigation and system button actions.

Access these methods through agent.actions. Navigate between screens and interact with system buttons.

goHome

Signature
goHome(): Promise<void>

Returns to the home screen.

Returns Promise<void>Resolves when navigation is complete.

Example
await agent.actions.goHome();

goBack

Signature
goBack(): Promise<void>

Presses the system back button.

Returns Promise<void>Resolves when back action is complete.

Example
await agent.actions.goBack();

recents

Signature
recents(): Promise<void>

Opens the recent apps screen.

Returns Promise<void>Resolves when recent apps screen is shown.

Example
await agent.actions.recents();

dpad

Signature
dpad(direction: "up" | "down" | "left" | "right" | "center"): Promise<void>

Sends a D-pad navigation event. Useful for navigating lists and menus. Requires Android 13+ (SDK level 33+).

ParameterTypeDescription
direction"up" | "down" | "left" | "right" | "center"Direction to navigate.

Returns Promise<void>Resolves when navigation is complete.

Example
await agent.actions.dpad("down");
Example
await agent.actions.dpad("center"); // Select/Enter
Note: dpad() requires Android 13+ (SDK level 33+). Check the device SDK version using agent.info.getDeviceInfo().sdkVersion.