mapbox-navigation-android icon indicating copy to clipboard operation
mapbox-navigation-android copied to clipboard

MapboxNavigation doesn't fetch a new route for offRoute and new `RerouteController`

Open RingerJK opened this issue 3 years ago • 1 comments

I issue: Incorrect reroute controller checks in MapboxNavigation

fun setRerouteController for NavigationRerouteController is not working correctly. It checks if a new rerouteController is fetching route, but must check legacy. https://github.com/mapbox/mapbox-navigation-android/blob/09cd530425a2ec891e39f9d2fa0ff6a729cc1af9/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt#L1131-L1139

there's working right https://github.com/mapbox/mapbox-navigation-android/blob/09cd530425a2ec891e39f9d2fa0ff6a729cc1af9/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt#L1116-L1124

II issue: If a current reroute controller is disabled for some time a new route might not be fetched at all

The only condition that is checked if the current rerouteControler is fetching route, but actually if arerouteController does not exist or it failed the SDK doesn't try to fetch a new route. Must be checked offRoute state as well

https://github.com/mapbox/mapbox-navigation-android/blob/09cd530425a2ec891e39f9d2fa0ff6a729cc1af9/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt#L1120

RingerJK avatar May 20 '22 10:05 RingerJK

The first issue is resolved via https://github.com/mapbox/mapbox-navigation-android/pull/5950.

dzinad avatar Jul 28 '22 15:07 dzinad