AAGuidanceState

data class AAGuidanceState(val maneuverIcon: ByteArray? = null, val chainedManeuverIcon: ByteArray? = null, val instruction: String? = null, val distanceToNextInstruction: String? = null, val distanceToDestination: String? = null, val durationToDestination: String? = null, val eta: String? = null, val currentSpeed: String? = null, val currentSpeedUnit: String? = null, val currentSpeedLimit: String? = null, val showOverspeedAlert: Boolean = false, val isAudioMuted: Boolean = false, val isGuidanceReady: Boolean = false, val isDestinationReached: Boolean = false, val isRerouting: Boolean = false, val aaManeuverType: Int = androidx.car.app.navigation.model.Maneuver.TYPE_UNKNOWN, val roundaboutExitNumber: Int = 0)

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 CarIcon

Usage

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

com.benomad.move.navigating_presentation.guidance.GuidanceState

Constructors

Link copied to clipboard
constructor(maneuverIcon: ByteArray? = null, chainedManeuverIcon: ByteArray? = null, instruction: String? = null, distanceToNextInstruction: String? = null, distanceToDestination: String? = null, durationToDestination: String? = null, eta: String? = null, currentSpeed: String? = null, currentSpeedUnit: String? = null, currentSpeedLimit: String? = null, showOverspeedAlert: Boolean = false, isAudioMuted: Boolean = false, isGuidanceReady: Boolean = false, isDestinationReached: Boolean = false, isRerouting: Boolean = false, aaManeuverType: Int = androidx.car.app.navigation.model.Maneuver.TYPE_UNKNOWN, roundaboutExitNumber: Int = 0)

Properties

Link copied to clipboard

The Android Auto Maneuver type constant for the current instruction.

Link copied to clipboard

Chained/upcoming maneuver icon as PNG-encoded ByteArray.

Link copied to clipboard

Current vehicle speed value.

Link copied to clipboard

Current speed limit as formatted string.

Link copied to clipboard

Unit for the current speed.

Link copied to clipboard

Formatted total distance remaining to the destination.

Link copied to clipboard

Formatted distance to the next maneuver.

Link copied to clipboard

Duration value to destination (without unit).

Link copied to clipboard
val eta: String?

Formatted estimated time of arrival.

Link copied to clipboard

Human-readable instruction text for the current maneuver.

Link copied to clipboard

Whether voice guidance is muted.

Link copied to clipboard

Whether the destination has been reached.

Link copied to clipboard

Whether the guidance engine is ready and providing updates.

Link copied to clipboard

Whether the route is being recalculated.

Link copied to clipboard

Current maneuver icon as PNG-encoded ByteArray.

Link copied to clipboard

The roundabout exit number for the current instruction.

Link copied to clipboard

Whether the vehicle is currently exceeding the speed limit.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Checks equality for ByteArray fields.

Link copied to clipboard
open override fun hashCode(): Int

Generates hash code including ByteArray fields.