class RouteRefreshController : RoutesObserver

This class lets you manage route refreshes.


Link copied to clipboard
open override fun onRoutesChanged(result: RoutesUpdatedResult)

Invoked whenever a list of routes changes and immediately when registered (see MapboxNavigation.registerRoutesObserver) if non-empty routes are present.

Link copied to clipboard
fun pauseRouteRefreshes()

Pauses route refreshes. If route refreshes are already paused, this is a no-op. After this invocation, no route refreshes will be done, except for the ones that are requested explicitly via refreshRoutesImmediately. To resume route refreshes, invoke resumeRouteRefreshes.

Link copied to clipboard
fun registerRouteRefreshStateObserver(routeRefreshStatesObserver: RouteRefreshStatesObserver)

Register a RouteRefreshStatesObserver to be notified of Route refresh state changes.

Link copied to clipboard
fun requestImmediateRouteRefresh()

Immediately refresh current navigation routes. Listen for refreshed routes using RoutesObserver.

Link copied to clipboard
fun resumeRouteRefreshes()

Resumes route refreshes that were paused via pauseRouteRefreshes. If route refreshes are not paused, this is a no-op.

Link copied to clipboard
fun unregisterRouteRefreshStateObserver(routeRefreshStatesObserver: RouteRefreshStatesObserver)