libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/NavigationViewModel.java
@Override
  public void onMilestoneEvent(RouteProgress routeProgress, String instruction, Milestone milestone) {
    if (instructionPlayer.isPollyPlayer() && milestone instanceof VoiceInstructionMilestone) {
      instructionPlayer.play(((VoiceInstructionMilestone) milestone).getSsmlAnnouncement());
    } else {
      instructionPlayer.play(instruction);
    }
    updateBannerInstruction(routeProgress, milestone);
  }
/**
   * Listener used to play instructions and finish this activity
   * when the arrival milestone is triggered.
   * <p>
   * Added to {@link com.mapbox.services.android.navigation.v5.navigation.MapboxNavigation}.
   *
   * @param routeProgress ignored in this scenario
   * @param instruction   to be voiced by the {@link InstructionPlayer}
   * @param milestone     the milestone being triggered
   * @since 0.8.0
   */
Listener used to play instructions and finish this activity
when the arrival milestone is triggered.

@param routeProgress ignored in this scenario
@param instruction   to be voiced by the  InstructionPlayer
@param milestone     the milestone being triggered
@since 0.8.0
Listener used to play instructions and finish this activity when the arrival milestone is triggered . @param routeProgress ignored in this scenario @param instruction to be voiced by the InstructionPlayer @param milestone the milestone being triggered @since 0 . 8 . 0
@Override
  public void onMilestoneEvent(RouteProgress routeProgress, String instruction, Milestone milestone) {
    if (instructionPlayer.isPollyPlayer() && milestone instanceof VoiceInstructionMilestone) {
      instructionPlayer.play(((VoiceInstructionMilestone) milestone).getSsmlAnnouncement());
    } else {
      instructionPlayer.play(instruction);
    }
    updateBannerInstruction(routeProgress, milestone);
  }
@ Override public void onMilestoneEvent ( RouteProgress routeProgress , String instruction , Milestone milestone ) { if ( instructionPlayer . isPollyPlayer ( ) && milestone instanceof VoiceInstructionMilestone ) { instructionPlayer . play ( ( ( VoiceInstructionMilestone ) milestone ) . getSsmlAnnouncement ( ) ) ; } else { instructionPlayer . play ( instruction ) ; } updateBannerInstruction ( routeProgress , milestone ) ; }
Listener used to play instructions and finish this activity
 when the arrival milestone is triggered.
Listener used to play instructions and finish this activity when the arrival milestone is triggered .