public class VoiceInstructionMilestone extends Milestone
MapboxNavigation
when default milestones are enabled.
Please note, this milestone has a custom trigger based on location progress along a route. If you set custom triggers, they will be ignored in favor of this logic.
Modifier and Type | Class and Description |
---|---|
static class |
VoiceInstructionMilestone.Builder |
Modifier and Type | Method and Description |
---|---|
String |
getAnnouncement()
Provide the instruction that can be used with Android's TextToSpeech.
|
Instruction |
getInstruction()
Milestone specific
Instruction , which can be used to build a String
instruction specified by the superclass. |
String |
getSsmlAnnouncement()
Provide the SSML instruction that can be used with Mapbox's API Voice.
|
boolean |
isOccurring(RouteProgress previousRouteProgress,
RouteProgress routeProgress)
A milestone can either be passed in to the
MapboxNavigation object
(recommended) or validated directly inside your activity. |
getIdentifier
public boolean isOccurring(RouteProgress previousRouteProgress, RouteProgress routeProgress)
Milestone
MapboxNavigation
object
(recommended) or validated directly inside your activity.isOccurring
in class Milestone
previousRouteProgress
- last locations generated RouteProgress
object used to
determine certain TriggerProperty
srouteProgress
- used to determine certain TriggerProperty
spublic Instruction getInstruction()
Milestone
Instruction
, which can be used to build a String
instruction specified by the superclass.getInstruction
in class Milestone
Instruction
to be used to build the String
passed to
MilestoneEventListener.onMilestoneEvent(RouteProgress, String, Milestone)
public String getSsmlAnnouncement()
This String will provide special markup denoting how certain portions of the announcement should be pronounced.
public String getAnnouncement()
This string will be in plain text.
© 2019 Mapbox. All rights reserved.