If i start Navigation with multiple waypoints then onarrival does not get called when a waypoint is reached.
Heres how i am getting route with multiple waypoints :
NavigationRoute.Builder builder = NavigationRoute.builder(HomeActivity.this)
.accessToken(Mapbox.getAccessToken())
.origin(originPoint)
.destination(destinationPoint);
if (address_list.size()>2) {
for (int i=1;i<address_list.size()-1;i++) {
builder.addWaypoint(Point.fromLngLat(address_list.get(i).getLongitude(),address_list.get(i).getLatitude()));
}
}
builder.profile(DirectionsCriteria.PROFILE_DRIVING)
.annotations(DirectionsCriteria.ANNOTATION_CONGESTION)
.alternatives(true);
builder.build()
.getRoute(this);
Android API: 28
Mapbox Navigation SDK version: com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.34.0
Steps to trigger behavior
1.Start a Navigation with waypoints
Expected behavior
onArrival should be called at every waypoint
Actual behavior
onArrival is only called on destination
If i start Navigation with multiple waypoints then onarrival does not get called when a waypoint is reached.
Heres how i am getting route with multiple waypoints :
NavigationRoute.Builder builder = NavigationRoute.builder(HomeActivity.this)
.accessToken(Mapbox.getAccessToken())
.origin(originPoint)
.destination(destinationPoint);
if (address_list.size()>2) {
for (int i=1;i<address_list.size()-1;i++) {
builder.addWaypoint(Point.fromLngLat(address_list.get(i).getLongitude(),address_list.get(i).getLatitude()));
}
}
builder.profile(DirectionsCriteria.PROFILE_DRIVING)
.annotations(DirectionsCriteria.ANNOTATION_CONGESTION)
.alternatives(true);
builder.build()
.getRoute(this);
Android API: 28
Mapbox Navigation SDK version: com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.34.0
Steps to trigger behavior
1.Start a Navigation with waypoints
Expected behavior
onArrival should be called at every waypoint
Actual behavior
onArrival is only called on destination