Doksi Docs
Device API

Device Settings

Control orientation, battery, GPS, dark mode, network speed, font scale, and animations.

Modify device configuration without navigating Android Settings. Changes take effect immediately.

set_orientation

Lock the device to portrait or landscape.

ParameterTypeRequiredValues
orientationstringYesportrait, landscape
Orientation set to landscape.

set_device_ability

Toggle core device capabilities on or off.

ParameterTypeRequiredDescription
abilitystringYeswifi, bluetooth, location, airplaneMode, autoRotate
enabledbooleanYestrue to enable, false to disable
WiFi has been disabled.

set_battery_level

Simulate a specific battery percentage.

ParameterTypeRequiredDescription
levelnumberYes0100
Battery level set to 15%.

set_charging_state

Simulate plugging in or unplugging the charger.

ParameterTypeRequiredDescription
chargingbooleanYestrue = charging, false = on battery
Charging state set to: not charging.

set_gps

Override the device GPS location. Optional parameters for altitude, speed, bearing, and satellite count.

ParameterTypeRequiredDescription
latitudenumberYes-90 to 90
longitudenumberYes-180 to 180
altitudenumberNoMeters above sea level
speednumberNoMeters per second
bearingnumberNoHeading in degrees
satellitesnumberNoVisible satellite count
GPS location set to 37.774929, -122.419416.

set_dark_mode

Toggle system-wide dark mode.

ParameterTypeRequiredDescription
enabledbooleanYestrue = dark mode on
Dark mode has been enabled.

set_font_scale

Set the system font scale. Useful for accessibility testing.

ParameterTypeRequiredDescription
scalenumberYes0.85, 1.0, 1.15, 1.3, or 1.5
ScaleLabel
0.85Small
1.0Default
1.15Large
1.3Larger
1.5Largest
System font scale set to 1.3x.

set_network_speed

Throttle network to simulate real-world connectivity.

ParameterTypeRequiredDescription
presetstringYesNetwork condition preset
PresetDescription
fullNo throttling
lte4G LTE
hsdpa3G
edge2.5G
gprs2G
gsm2G (slowest)
Network speed set to EDGE (2.5G).

set_animations

Control system animation speed. Set to 0 to disable animations entirely — recommended for automated test flows to eliminate timing variability.

ParameterTypeRequiredDescription
scalenumberYes0 = disabled, 1 = normal, 2+ = slow motion. Range: 010
Animation scale set to 0 (animations disabled).

On this page