I was trying to prevent the MapboxNavigation from automatically finding a new route, when the user is detected as off-route, since I would like to perform another action instead.
I used the OffRouteObserver to perform this action and it is running, but it seems that the Re-route is still executed.
In the MapboxNavigation.kt file, there is an internal off route observer which calls reroute() function when off route is detected. I have no idea how to change this.
If this feature is possible, please let me know. Thank you
I see a few options that you can do:
MapboxNavigation.setRerouteController
;MapboxNavigation.registerRoutesObserver
) and check if they were fetched from OnBoard tiles, then do what you want to do with it. To check where routes were fetched from, you need to invoke NavigationRoute.origin;