libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/route/RouteViewModel.java
@Override
  public void onResponse(@NonNull Call<DirectionsResponse> call, @NonNull Response<DirectionsResponse> response) {
    if (validRouteResponse(response)) {
      route.setValue(response.body().routes().get(0));
    }
  }
/**
   * A new directions response has been received.
   * <p>
   * The {@link DirectionsResponse} is validated.
   * If navigation is running, {@link MapboxNavigation} is updated and reroute state is dismissed.
   * If not, navigation is started.
   *
   * @param call     used to request the new {@link DirectionsRoute}
   * @param response contains the new {@link DirectionsRoute}
   * @since 0.6.0
   */
A new directions response has been received.

The  DirectionsResponse is validated.
If navigation is running,  MapboxNavigation is updated and reroute state is dismissed.
If not, navigation is started.

@param call     used to request the new  DirectionsRoute
@param response contains the new  DirectionsRoute
@since 0.6.0
A new directions response has been received . The DirectionsResponse is validated . If navigation is running MapboxNavigation is updated and reroute state is dismissed . If not navigation is started . @param call used to request the new DirectionsRoute @param response contains the new DirectionsRoute @since 0 . 6 . 0
@Override
  public void onResponse(@NonNull Call<DirectionsResponse> call, @NonNull Response<DirectionsResponse> response) {
    if (validRouteResponse(response)) {
      route.setValue(response.body().routes().get(0));
    }
  }
@ Override public void onResponse ( @ NonNull Call < DirectionsResponse > call , @ NonNull Response < DirectionsResponse > response ) { if ( validRouteResponse ( response ) ) { route . setValue ( response . body ( ) . routes ( ) . get ( 0 ) ) ; } }
A new directions response has been received.
A new directions response has been received .