Skip to content

onArrival doesn't get called if navigation is started with multiple stops #1904

@hussi1

Description

@hussi1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions