Skip to main content

location · setLocation · clearLocation · followRoute · followGpx

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

Read where the device believes it is, or place it somewhere. These call app_location.

location​

location(): Promise<Data>

setLocation​

setLocation(latitude: number, longitude: number): Promise<Data>

clearLocation​

clearLocation(): Promise<Data>

followRoute​

followRoute(waypoints: [number, number][], speed?: number): Promise<Data>

followGpx​

followGpx(path: string, speed?: number): Promise<Data>

Examples​

Put the device in London​

await device.setLocation(51.5074, -0.1278)

The same call from the command line, mobium location 51.5074 -0.1278, printed on an Android 15 emulator:

the device is at 51.507400,-0.127800, injected and read back

mobium location 51.5074 -0.1278 on an Android 15 emulator

mobium location 51.5074 -0.1278 on an Android 15 emulator

Give it back its own position​

await device.clearLocation()

The same call from the command line, mobium location --clear, printed on an Android 15 emulator:

the test provider is removed — the device will report its own position the next time something asks for one. Its last known location is still the injected one until then; Android keeps that cache and nothing here can clear it