With HERE SDK developers can enable turn-by-turn route navigation that takes live traffic information into account.
NavigationManager.setTrafficAvoidanceMode() can be used to set the way in which traffic should be handled during navigation.
NavigationManager.TrafficAvoidanceModeenumerations. The default mode is
DYNAMIC- Performs traffic-aware rerouting without user input.
In this mode the guidance engine performs periodic route calculations while the device is online. A route calculation is a server request where the server finds the most optimal route by avoiding traffic congestions and calculating speed limits. If the calculated route is different from the current route, the navigation manager automatically switches to the new route. It also triggers
NavigationManager.NavigationManagerEventListener.onRouteUpdated(Route)callback method.Note: You can set the frequency of the route request by using
MANUAL- Provides the traffic-aware rerouting callback
In this mode no rerouting occurs unless the
NavigationManageris explicitly set with the new
Route. For more information, see the next section.
DISABLE- Disables traffic-based rerouting.