DashController

Controller for a Dash instance running in the host application.

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Update search results list with ETA and distance values. If a search result already has non-null ETA and distance, it won't be updated.

Link copied to clipboard
abstract suspend fun addFavoriteItem(result: DashSearchResult, favoriteType: String)

Add item to the favorites.

Link copied to clipboard
abstract suspend fun addHistoryItem(result: DashSearchResult)

Add item to the history.

Link copied to clipboard
abstract suspend fun cleanHistory()

Clean history.

Link copied to clipboard
abstract suspend fun fetchRoutes(destination: DashDestination): Result<List<NavigationRoute>>

Fetch routes for a given destination. Returns a list of NavigationRoute that can be used to start navigation.

Link copied to clipboard
abstract suspend fun forward(query: String, proximity: Point? = null, boundingBox: BoundingBox? = null): List<DashSearchResult>

Perform a forward search with a given query.

Link copied to clipboard

Returns DashOfflineRegionMetadata for the current offline tile pack, null if no tile pack is loaded.

Link copied to clipboard
abstract suspend fun getSearchAlongTheRouteOptions(routeProgress: RouteProgress): SearchAlongTheRouteOptions
Link copied to clipboard
abstract fun handleIntent(intent: Intent, fragment: DashNavigationFragment): Boolean
Link copied to clipboard
abstract suspend fun navigateNextRouteLeg(): Result<Unit>

After arriving at a stop, this can be used to manually decide when to start navigating to the next stop.

Link copied to clipboard
abstract fun observeAudioFocus(): Flow<AudioFocusEvent>

Observes audio focus events.

Link copied to clipboard
abstract fun observeAvailableChargeStatePoints(chargeValues: List<Int>): Flow<List<ChargeStatePoint>>

Observes available charge state points on the map during active guidance.

Link copied to clipboard
abstract fun observeDebugBundleReady(): Flow<File>

Observe debug bundle is ready and saved on the file system

Link copied to clipboard

Observe the current external profile.

Link copied to clipboard

Observe favorites.

Link copied to clipboard
abstract fun observeGenericEvents(): Flow<DashEventBase>

A Flow that emits generic events.

Link copied to clipboard
abstract fun observeHistory(): Flow<List<DashSearchResult>>

Observe history.

Link copied to clipboard
abstract fun observeLocationMatcherResult(): Flow<LocationMatcherResult>

A Flow that emits the best possible location update, snapped to the route or map-matched to the road if possible.

Link copied to clipboard
abstract fun observeLogs(): Flow<LogEvent>

A Flow that emits whenever a log is available.

Link copied to clipboard

Observes the status of the navigation database.

Link copied to clipboard

A Flow that emits NavigationEvent.

Link copied to clipboard

A Flow that emits every time a NavigationState changes. Upon collection, the first emitted value is always current NavigationState.

Link copied to clipboard
abstract fun observeNextManeuver(): Flow<Maneuver?>

A Flow that emits every time the next Maneuver.

Link copied to clipboard
abstract fun observeRawLocation(): Flow<Location>

A Flow that emits every time a new Location has been received.

Link copied to clipboard

A Flow that emits DashRoadInfoEvent.

Link copied to clipboard
abstract fun observeRouteProgress(): Flow<RouteProgress>
Link copied to clipboard
abstract fun observeRoutes(): Flow<RouteChangeEvent>

A Flow that emits whenever a list of active routes changes.

Link copied to clipboard

A Flow that emits whenever the active route waypoints change.

Link copied to clipboard

Observe search request state.

Link copied to clipboard

Observe search results.

Link copied to clipboard

Observe search suggestions.

Link copied to clipboard
abstract suspend fun removeExternalProfile(profileId: String?): Boolean

Remove the external profile with the specified id. Only non-active profiles can be removed. null means the default anonymous profile.

Link copied to clipboard
abstract suspend fun removeFavoriteItem(result: DashSearchResult, favoriteType: String)

Remove item from the favorites.

Link copied to clipboard
abstract suspend fun removeHistoryItem(result: DashSearchResult)

Remove item from the history.

Link copied to clipboard
abstract suspend fun resetNavigationState(shouldShowRouteRecoveryPrompt: Boolean = false): Result<Unit>

Resets the navigation state in FreeDrive by clearing all routes and stopping active guidance.

Link copied to clipboard
abstract suspend fun search(query: String, proximity: Point? = null, boundingBox: BoundingBox? = null): List<DashSearchSuggestion>

Perform suggestions search with a given query.

Link copied to clipboard
abstract fun setExternalProfile(profile: ExternalProfile?)

Create an external profile if it doesn't exist and activate it. null means the default anonymous profile.

Link copied to clipboard

Set a list of navigation suggestions.

Link copied to clipboard
abstract suspend fun startNavigation(route: NavigationRoute): Result<Unit>

Start active guidance with the given route.

abstract suspend fun startNavigation(routeIndex: Int = 0): Result<Unit>

Start active guidance with the route indicated by the index. The default is index 0.

Link copied to clipboard
abstract fun startTripSession(): Result<Unit>

Starts listening for location updates and enters an Active Guidance state if there's a primary route available or a Free Drive state otherwise.

Link copied to clipboard
abstract suspend fun stopNavigation(): Result<Unit>

Stop active guidance and revert back to Free Drive state.

Link copied to clipboard
abstract fun stopTripSession()

Stops listening for location updates and enters an Idle state.