Package com.tomtom.sdk.navigation

Types

Link copied to clipboard
data class ActiveRoute(val routePlan: RoutePlan, val betterProposal: RoutePlan?)

ActiveRoute class contains an active RoutePlan, and a better proposal RoutePlan. Better proposal RoutePlan can be null.

Link copied to clipboard
value class InstructionPhase(val phase: Int)

Represents instruction triggering phase.

Link copied to clipboard
data class NavigationConfiguration constructor(    val context: Context,     val apiKey: String,     val locationEngine: LocationEngine,     val routingApi: RoutingApi,     val mapMatchingEngine: MapMatchingEngine = TomTomMapMatchingEngine(context),     val dataStoreUpdateContextEngine: DataStoreUpdateContextEngine? = null,     val guidanceEngine: GuidanceEngine = GuidanceEngineFactory.createGuidanceEngine( context, GuidanceEngineOptions() ),     val routeTrackingEngine: RouteTrackingEngine = RouteTrackingEngineFactory.create(context),     val routeProgressCalculationEngine: RouteProgressCalculationEngine = RouteProgressCalculationEngineFactory.create(),     val locationContextProviderEngine: LocationContextProviderEngine = TomTomLocationContextProviderEngine( context ),     val arrivalDetectionEngine: ArrivalDetectionEngine = TomTomArrivalDetectionEngine(),     val routeReplanningEngine: RouteReplanningEngine = RouteReplanningEngineFactory.create( routingApi ),     val replanningRetryPolicy: ReplanningRetryPolicy = TomTomReplanningRetryPolicy(),     val continuousReplanningMode: ContinuousReplanningMode = ContinuousReplanningMode.MANUAL,     val deviationReplanningMode: DeviationReplanningMode = DeviationReplanningMode.AUTOMATIC,     val maintainRoutesMode: MaintainRoutesMode = MaintainRoutesMode.ActiveRouteOnly,     val apiPath: URI? = null,     val apiKeyParamName: String? = null,     val telemetryApi: TelemetryApi? = null)

Configuration of the Navigation SDK.

Link copied to clipboard
interface NavigationController : Disposable

Responsible for interacting with and customizing a navigation.

Link copied to clipboard
open class NavigationError

Represents an error raised when something went wrong in navigation.

Link copied to clipboard
data class NavigationHistorySnapshot(val visitedRouteCoordinates: List<RouteCoordinate>)

Navigation history is a structure containing info regarding the passed history of the route, such as visited polyline points (route coordinates).

Link copied to clipboard
data class NavigationOptions(val activeRoutePlan: RoutePlan?)

NavigationOptions class contains an active RoutePlan, and a list of alternative RoutePlan. Active RoutePlan can be null.

Link copied to clipboard
data class NavigationSnapshot(    val activeRoute: ActiveRoute?,     val alternativeRoutes: List<RoutePlan>,     val routes: List<Route>,     val routeCreationTime: Long,     val isGuidanceAvailable: Boolean,     val location: GeoLocation,     val mapMatchingResult: MapMatchingResult,     val locationContext: LocationContext,     val routeProgress: RouteProgress,     val history: NavigationHistorySnapshot,     val hasRouteDeviated: Boolean,     val hasReachedDestination: Boolean,     val currentInstructionId: UniqueId?,     val proposedRoute: ReplannedRoute?,     val waypointSnapshot: NavigationWaypointSnapshot)

Read-only snapshot of the current navigation session.

Link copied to clipboard
interface NavigationStartedCallback

Callback used in starting navigation. Starting navigation is asynchronous, and the callback methods will be called after the operation is finished, whether it succeeds or not.

Link copied to clipboard
class NavigationStartError(val message: String) : NavigationError

Returned when an error occurred during initialization of the underlying services.

Link copied to clipboard
data class NavigationWaypointSnapshot(val nextWaypoint: Waypoint?, val numberOfVisitedWaypoints: Int)

Read-only snapshot of the waypoints in the current navigation session.

Link copied to clipboard
fun interface OnDestinationReachedListener

Used to inform caller about the arrival at the destination.

Link copied to clipboard
fun interface OnErrorListener

Used to inform caller about errors during navigating. Can be registered with TomTomNavigation.addOnNavigationErrorListener.

Link copied to clipboard
interface OnGuidanceUpdateListener

Used to inform caller about guidance.

Link copied to clipboard
interface OnLaneGuidanceUpdateListener

Used to inform caller about lane guidance.

Link copied to clipboard
fun interface OnLocationContextUpdateListener

Used to inform caller about detailed information in current location on road.

Link copied to clipboard
fun interface OnLocationMatchedListener

Used to inform caller that current location has been matched to the road.

Link copied to clipboard
fun interface OnLocationPredictionsGeneratedListener

Used to inform caller that new predictions has been generated.

Link copied to clipboard
fun interface OnNavigationStartedListener

Used to inform caller that navigation has been started.

Link copied to clipboard
fun interface OnProgressUpdateListener

Used to inform caller about progress on Route.

Link copied to clipboard
fun interface OnRouteDeviationListener

Used to inform caller about getting off the route.

Link copied to clipboard
fun interface OnRouteUpdatedListener

Used to inform caller that the route has been updated.

Link copied to clipboard
fun interface OnWaypointVisitedListener

Used to inform a caller that the waypoint has been visited.

Link copied to clipboard
annotation class PublicPreviewNavigationApi
Link copied to clipboard
data class RoutePlan(val route: Route, val routePlanningOptions: RoutePlanningOptions)

Options to specify all required parameters for a single navigation session.

Link copied to clipboard
interface RouteUpdatedCallback

Callback used in the update function. Route update is asynchronous and the callback methods will be called once the update is finished, whether it succeeds or not.

Link copied to clipboard
class RouteUpdateError(val message: String) : NavigationError

Returned when an error occurred while updating the Route.

Link copied to clipboard
enum RouteUpdateReason : Enum<RouteUpdateReason>

Specifies the reason for updating the current route.

Link copied to clipboard
class TomTomNavigation : NavigationController

Responsible for interacting with and customizing a navigation.