Package-level declarations

Types

Link copied to clipboard

Returns the device's last known cached location from android.location.LocationManager (no fresh fix is requested). Requires ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION. Accepts an accuracy param ("fine" | "coarse", default "coarse") that only reorders the provider preference (GPS/network/fused). Output: latitude, longitude, accuracy_meters, altitude, speed_mps, timestamp, provider. Returns ToolResult.error when permission is missing, the accuracy value is invalid, or no cached fix exists on any enabled provider.

Link copied to clipboard

Reverse-geocodes a latitude/longitude pair to a postal address via the platform android.location.Geocoder (needs network access; no location permission). On API 33+ uses the async callback API with a 5 s timeout; below that the deprecated blocking call. Output: latitude, longitude, formatted_address, street, city, district, state, country, country_code, postal_code. Returns ToolResult.error for out-of-range coordinates, when no Geocoder backend is present, on timeout, or when no address matches.

Link copied to clipboard

Provider for the location tools: GetCurrentLocationTool and GetLocationAddressTool. Note that only the current-location tool gates on these permissions; reverse geocoding needs network access, not a location permission.