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 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 detachMapGptPermissionLauncher(activityResultCaller: ActivityResultCaller)
Link copied to clipboard
Link copied to clipboard
abstract suspend fun getSearchAlongTheRouteOptions(routeProgress: RouteProgress): SearchAlongTheRouteOptions

Returns SearchAlongTheRouteOptions for the current routeProgress, that can be passed to openMapWithCategorySearch and DashSearchEngine.categorySearch functions.

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 observeCameraState(): Flow<DashCameraState>

Flowable that emits DashCameraState.

Link copied to clipboard

Observe the current external profile.

Link copied to clipboard

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
abstract fun observeMapMarkers(): Flow<List<DashMarker>>

Observe map markers.

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, anchorPoint: Point? = null, boundingBox: BoundingBox? = null, searchAlongTheRouteOptions: SearchAlongTheRouteOptions? = null)

Search provided category and show results on the map.

Link copied to clipboard
abstract suspend fun openMapWithSearch(query: String, anchorPoint: Point? = null, boundingBox: BoundingBox? = null)

Search provided query and show results on the map.

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

Open search with the given query and anchor point.

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)

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
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 fun setUserInputMiddleware(middleware: UserInputOwnerMiddleware)
Link copied to clipboard
abstract fun setVoicePlayerMiddleware(middleware: VoicePlayerMiddleware)
Link copied to clipboard
abstract fun showRoutesOverview()

Shows current routes. Should be called in ActiveGuidance.Idle state.

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 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 suspend fun updateAltimeterData(data: DashAltimeterData): Result<Unit>
Link copied to clipboard
abstract suspend fun updateCompassData(data: DashCompassData): Result<Unit>
Link copied to clipboard
abstract suspend fun updateEtcGateInfo(info: DashEtcGateInfo): Result<Unit>
Link copied to clipboard
Link copied to clipboard
abstract fun updateMapGptContextOverrides(update: MapGptContextOverrides.() -> Unit)
Link copied to clipboard
abstract suspend fun updateOdometryData(data: DashOdometryData): Result<Unit>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract suspend fun updateRawGnssData(data: DashRawGnssData): Result<Unit>
Link copied to clipboard
abstract suspend fun updateRawGravityData(data: DashRawGravityData): Result<Unit>
Link copied to clipboard
Link copied to clipboard
abstract suspend fun updateRawLocation(location: Location): Result<Unit>
Link copied to clipboard
abstract suspend fun updateSpeedData(data: DashSpeedData): Result<Unit>