buildTrip

fun buildTrip(guidanceState: AAGuidanceState, destinationTitle: String): Trip?

Builds a Trip object from the current guidance state.

Creates a Trip containing:

  • A single Destination with the destination title and travel estimate

  • A single Step with the current maneuver instruction

  • Loading state when rerouting

Return

A Trip object if guidance data is available, null if insufficient data

Parameters

guidanceState

The current guidance state from the phone app

destinationTitle

The name of the destination being navigated to