Skip to main content

orientation · setOrientation

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Read which way the screen is turned, or turn it. These call app_orientation.

orientation​

orientation(): Promise<{ orientation: string; locked: boolean }>

setOrientation​

setOrientation(mode: 'portrait' | 'landscape' | 'portrait-reverse' | 'landscape-reverse' | 'auto'): Promise<string>

Examples​

Turn the screen to landscape​

await device.setOrientation('landscape')

The same call from the command line, mobium orientation landscape, printed on an Android 15 emulator:

landscape (locked) (was portrait)

mobium orientation landscape on an Android 15 emulator

mobium orientation landscape on an Android 15 emulator