AAGuidanceState
Data class representing the guidance state for Android Auto display.
This class is a module-agnostic representation of navigation guidance information, designed to be used by the Android Auto module without depending on app-specific types like Bitmap or Route.
Purpose
Module isolation: Uses primitive types and ByteArrays instead of Android graphics types
Cross-module compatibility: Can be used by androidauto module without navigating_presentation dependency
Serializable icons: Bitmaps are converted to PNG ByteArrays for safe cross-module transfer
Icon Conversion
Maneuver icons are stored as PNG-encoded ByteArrays rather than Bitmap objects. The conversion flow is:
GuidanceState.maneuverIcon (Bitmap)
→ GuidanceProviderAdapter converts to ByteArray
→ AAGuidanceState.maneuverIcon (ByteArray)
→ AndroidAutoNavigationScreen converts to CarIconUsage
This class is populated by GuidanceProviderAdapter in the app module:
val aaState = AAGuidanceState(
maneuverIcon = guidanceState.maneuverIcon?.toByteArray(),
instruction = guidanceState.instruction,
distanceToNextInstruction = guidanceState.distanceToNextInstruction,
// ...
)See also
Constructors
Properties
The Android Auto Maneuver type constant for the current instruction.
Chained/upcoming maneuver icon as PNG-encoded ByteArray.
Current vehicle speed value.
Current speed limit as formatted string.
Unit for the current speed.
Formatted total distance remaining to the destination.
Formatted distance to the next maneuver.
Duration value to destination (without unit).
Human-readable instruction text for the current maneuver.
Whether voice guidance is muted.
Whether the destination has been reached.
Whether the guidance engine is ready and providing updates.
Whether the route is being recalculated.
Current maneuver icon as PNG-encoded ByteArray.
The roundabout exit number for the current instruction.
Whether the vehicle is currently exceeding the speed limit.