Android Device
Use device_status for state and permission checks.
Use device for system actions.
Tool Map
device_statuswithaction=info|permissions|locationdevicewithaction=open_url|share|open_app_settings
Default Automation Policy
- Set
request_if_missing=truewhen permissions may be missing. - Set
open_settings_if_failed=truefor automatic recovery. - Set
wait_user_confirmation=trueonly when the app cannot complete the system step itself. - Avoid pre-confirmation for normal operations.
Location Playbook
- Call
device_status(action="location", provider="auto", prefer_fine=true). - If no fix, retry with
provider="network". - If location service is disabled, allow settings handoff and continue.
- If still unavailable, return recoverable error with next step.
Common Calls
device_status(action="permissions", permissions=[...], request_if_missing=true, open_settings_if_failed=true, wait_user_confirmation=true)device_status(action="location", provider="auto", prefer_fine=true, open_settings_if_failed=true, wait_user_confirmation=true)device(action="open_url", url="https://...")device(action="share", text="...", subject="...")
Failure Recovery
permissions_missingorpermissions_denied: grant permissions and retry.location_disabled: enable location service in settings, then continue.ui_unavailable: foreground app and retry same call.