Skip to main content
device is a runtime proxy over the Android emulator API. Use it for emulator-level operations — such as setting location, placing images in the virtual camera scene, or configuring network proxies — that sit outside app UI interactions. Use driver for interacting with the app itself. device is only available while a flow is running.

setGeoLocation

Sets the emulator’s GPS location.
Example:
Use this to test location-aware features without physically moving a device. See Mock device location for a full walkthrough.

setVirtualSceneImage

Places an image into the Android emulator’s virtual camera scene. Use this to test features that require the camera to see a specific image — such as barcode or QR code scanning.
Example:
Virtual scene is scoped to barcode/QR code scanning and augmented reality (AR) use cases. It is not a general photo or video injection mechanism. See Android barcode and QR scanning for a full walkthrough.

playAutomation

Triggers an automation macro on the Android emulator. Use this in combination with setVirtualSceneImage to animate the virtual camera toward a placed image.
Example:
Available built-in macros are determined by the Android emulator. Walk_to_image_room is the macro used to animate the virtual camera toward a placed image. See Android Emulator camera support for more detail on virtual scene automation.

setProxy

Configures a proxy for the Android emulator’s network traffic.
Example:

clearProxy

Removes any proxy configuration from the Android emulator.
Example:
Call clearProxy() at the end of any flow that sets a proxy to avoid affecting subsequent flows.
Last modified on May 25, 2026