public class NavigationViewModel
extends android.arch.lifecycle.AndroidViewModel
Modifier and Type | Field and Description |
---|---|
android.arch.lifecycle.MutableLiveData<BannerInstructionModel> |
bannerInstructionModel |
android.arch.lifecycle.MutableLiveData<InstructionModel> |
instructionModel |
android.arch.lifecycle.MutableLiveData<java.lang.Boolean> |
isOffRoute |
android.arch.lifecycle.MutableLiveData<SummaryModel> |
summaryModel |
Constructor and Description |
---|
NavigationViewModel(android.app.Application application) |
Modifier and Type | Method and Description |
---|---|
void |
cancelFeedback()
Used to cancel an existing
FeedbackItem . |
void |
onDestroy(boolean isChangingConfigurations) |
void |
recordFeedback(java.lang.String feedbackSource)
Records a general feedback item with source
|
com.mapbox.services.android.navigation.v5.navigation.MapboxNavigation |
retrieveNavigation()
Returns the current instance of
MapboxNavigation . |
void |
setMuted(boolean isMuted) |
void |
updateFeedback(FeedbackItem feedbackItem)
Used to update an existing
FeedbackItem
with a feedback type and description. |
public final android.arch.lifecycle.MutableLiveData<InstructionModel> instructionModel
public final android.arch.lifecycle.MutableLiveData<BannerInstructionModel> bannerInstructionModel
public final android.arch.lifecycle.MutableLiveData<SummaryModel> summaryModel
public final android.arch.lifecycle.MutableLiveData<java.lang.Boolean> isOffRoute
public NavigationViewModel(android.app.Application application)
public void onDestroy(boolean isChangingConfigurations)
public void setMuted(boolean isMuted)
public void recordFeedback(java.lang.String feedbackSource)
public void updateFeedback(FeedbackItem feedbackItem)
FeedbackItem
with a feedback type and description.
Uses cached feedbackId to ensure the proper item is updated.
feedbackItem
- item to be updatedpublic void cancelFeedback()
FeedbackItem
.
Uses cached feedbackId to ensure the proper item is cancelled.
@Nullable public com.mapbox.services.android.navigation.v5.navigation.MapboxNavigation retrieveNavigation()
MapboxNavigation
.
Will be null if navigation has not been initialized.