NavigationViewModel

open class NavigationViewModel : AndroidViewModel

Constructors

NavigationViewModel
Link copied to clipboard
open fun NavigationViewModel(application: Application)
NavigationViewModel
Link copied to clipboard
@TestOnly()
open fun NavigationViewModel(application: Application, navigation: MapboxNavigation, navigationViewOptions: NavigationViewOptions)
NavigationViewModel
Link copied to clipboard
@TestOnly()
open fun NavigationViewModel(application: Application, navigation: MapboxNavigation, dispatcher: NavigationViewEventDispatcher, cache: VoiceInstructionCache, speechPlayer: SpeechPlayer)

Functions

clear
Link copied to clipboard
fun clear()
closeWithRuntimeException
Link copied to clipboard
open fun closeWithRuntimeException(obj: Any)
getApplication
Link copied to clipboard
open fun <T : Application?> getApplication(): T
getTag
Link copied to clipboard
open fun <T> getTag(key: String): T
initialize
Link copied to clipboard
open fun initialize(options: NavigationViewOptions)
This method will pass NavigationOptions from the NavigationViewOptions to this view model to be used to initialize MapboxNavigation.
initializeEventDispatcher
Link copied to clipboard
open fun initializeEventDispatcher(navigationViewEventDispatcher: NavigationViewEventDispatcher)
isMuted
Link copied to clipboard
open fun isMuted(): Boolean
onCleared
Link copied to clipboard
open fun onCleared()
onDestroy
Link copied to clipboard
open fun onDestroy(isChangingConfigurations: Boolean)
retrieveBannerInstructions
Link copied to clipboard
open fun retrieveBannerInstructions(): LiveData<BannerInstructions>
retrieveDestination
Link copied to clipboard
open fun retrieveDestination(): LiveData<Point>
retrieveIsFeedbackSentSuccess
Link copied to clipboard
open fun retrieveIsFeedbackSentSuccess(): LiveData<Boolean>
retrieveIsOffRoute
Link copied to clipboard
open fun retrieveIsOffRoute(): LiveData<Boolean>
retrieveNavigation
Link copied to clipboard
open fun retrieveNavigation(): MapboxNavigation
Returns the current instance of MapboxNavigation.
retrieveNavigationLocation
Link copied to clipboard
open fun retrieveNavigationLocation(): LiveData<Location>
retrieveRoute
Link copied to clipboard
open fun retrieveRoute(): LiveData<DirectionsRoute>
retrieveRouteProgress
Link copied to clipboard
open fun retrieveRouteProgress(): LiveData<RouteProgress>
retrieveShouldRecordScreenshot
Link copied to clipboard
open fun retrieveShouldRecordScreenshot(): LiveData<Boolean>
setMuted
Link copied to clipboard
open fun setMuted(isMuted: Boolean)
setTagIfAbsent
Link copied to clipboard
open fun <T> setTagIfAbsent(key: String, newValue: T): T
stopNavigation
Link copied to clipboard
open fun stopNavigation()
takeScreenshot
Link copied to clipboard
open fun takeScreenshot()
updateFeedback
Link copied to clipboard
open fun updateFeedback(feedbackItem: FeedbackItem)
Used to update an existing FeedbackItem with a feedback type and description.
updateFeedbackScreenshot
Link copied to clipboard
open fun updateFeedbackScreenshot(screenshot: String)
updateLocation
Link copied to clipboard
open fun updateLocation(location: Location)
updateRouteProgress
Link copied to clipboard
open fun updateRouteProgress(routeProgress: RouteProgress)

Properties

distanceFormatter
Link copied to clipboard
private open val distanceFormatter: DistanceFormatter
isRunning
Link copied to clipboard
private open val isRunning: Boolean
navigationViewOptions
Link copied to clipboard
private open val navigationViewOptions: NavigationViewOptions