DashController

Controller for a Dash instance running in the host application.

Properties

Link copied to clipboard

Functions

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

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 fun attachMapGptPermissionLauncher(activityResultCaller: ActivityResultCaller)
Link copied to clipboard
abstract suspend fun cleanHistory()

Clean history.

Link copied to clipboard
abstract suspend fun closeSearch()

Close search screen.

Link copied to clipboard
abstract fun createMapGptUI(mapGptUIOptions: MapGptUIOptions): MapGptDetachableUI
Link copied to clipboard
abstract fun detachMapGptPermissionLauncher(activityResultCaller: ActivityResultCaller)
Link copied to clipboard
Link copied to clipboard
abstract fun observeCameraState(): Flow<DashCameraState>

Flowable that emits DashCameraState.

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

Observe favorites.

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

Observe history.

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

Flowable 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>

Flowable that emits whenever a log is available.

Link copied to clipboard
abstract fun observeMapEvents(): Flow<DashMapEvent>

Flowable that Mapbox Map events.

Link copied to clipboard

Flowable that MapGPT card events.

Link copied to clipboard
abstract fun observeMapGptEvents(): Flow<DashMapGptEvent>

Flowable that MapGPT events.

Link copied to clipboard

Flowable that emits NavigationEvent.

Link copied to clipboard

Flowable 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?>

Flowable that emits every time the next Maneuver.

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

Flowable that emits every time a new Location has been received.

Link copied to clipboard

Flowable that emits DashRoadInfoEvent.

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

Flowable that emits whenever a list of maintained routes changes.

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 openMapWithCategorySearch(category: String, displayName: String)

Search provided category and show results on the map.

Link copied to clipboard
abstract suspend fun openMapWithSearch(query: String)

Search provided query and show results on the map.

Link copied to clipboard
abstract fun openSearch(searchQuery: String?, anchorPoint: Point? = null)

Open search with the given query and anchor point.

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

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 search(query: String, proximity: Point? = null, boundingBox: BoundingBox? = null): List<DashSearchSuggestion>

Perform search with a given query.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract suspend fun setDestination(destination: DashDestination): Result<DashRoutePreview>

Set a destination for Dash to navigate to. Returns a DashRoutePreview that can be used to start navigation.

Link copied to clipboard
abstract fun setEvDataProvider(evDataProvider: EvDataProvider)

Set EV data provider that provides EV relevant data, like state of charge, charging curves, etc.

Link copied to clipboard

Set a list of navigation suggestions.

Link copied to clipboard
abstract fun setUserInputMiddleware(middleware: UserInputOwnerMiddleware)
Link copied to clipboard
abstract fun setVoicePlayerMiddleware(middleware: VoicePlayerMiddleware)
Link copied to clipboard
abstract suspend fun startNavigation(route: NavigationRoute): Result<Unit>

Start active guidance with the given route.

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 fun stopMapGptConversation()
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.

Link copied to clipboard
Link copied to clipboard
abstract fun updateMapGptContextOverrides(update: MapGptContextOverrides.() -> Unit)