Package-level declarations
Types
Returns the device's location from android.location.LocationManager: the freshest cached fix, or — when no provider has one (e.g. a fresh device where no app has asked yet) — a fresh fix requested from every enabled provider at once, bounded by FRESH_FIX_TIMEOUT_MS. Output key source is "cache" or "fresh". 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). Every enabled provider is consulted and the freshest cached fix wins (preference order breaks ties); a SecurityException from one provider (e.g. GPS under a coarse-only grant) just skips it. Output: latitude, longitude, accuracy_meters, altitude, speed_mps, timestamp, provider. Returns ToolResult.error when permission is missing (or every enabled provider refused with a SecurityException), the accuracy value is invalid, or no cached fix exists on any enabled provider.
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 (backend errors reported via GeocodeListener.onError resolve immediately); 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.
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.