AANavigationState

sealed class AANavigationState

Sealed class representing valid Android Auto navigation screen states.

This state machine defines the possible screens in the Android Auto navigation flow and serves as the foundation for validating screen transitions.

State Diagram

DISCONNECTED ──────────────────────────────────────────────┐
│ │
↓ (AA connects) │
┌─────────┐ │
│ MAP_VIEW │ ←───────────────────────────────────────────┐ │
└─────────┘ │ │
│ ↑ │ │
│ │ (back/cancel from any screen) │ │
↓ │ │ │
┌─────────┐ │ │
│ SEARCH │ ─────────────────────────────────────────────┤ │
└─────────┘ │ │
│ │ │
│ (select destination) │ │
↓ │ │
┌─────────────────┐ │ │
│ ROUTE_PREVIEW │ ─────── (back/cancel) ───────────────┤ │
└─────────────────┘ │ │
│ │ │
│ (start navigation) │ │
↓ │ │
┌─────────────────┐ │ │
│ NAVIGATION │ ─── (back/stop/arrived) ─────────────┘ │
└─────────────────┘ │
│
│ (AA disconnects - any state) │
↓ │
DISCONNECTED ←─────────────────────────────────────────────┘

Properties

Each state has associated metadata:

  • screenName: Human-readable name for logging

  • allowsBack: Whether the back button should navigate back

  • isTerminal: Whether this is a terminal state (no further navigation)

See also

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Custom(val customScreenName: String, val customAllowsBack: Boolean = true) : AANavigationState

Custom screen state for client-defined screens.

Link copied to clipboard

Android Auto is not connected.

Link copied to clipboard

Main map view is displayed.

Link copied to clipboard

Active navigation is in progress.

Link copied to clipboard

Route preview screen is displayed.

Link copied to clipboard

Search screen is displayed.

Link copied to clipboard

Settings screen is displayed.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard