With the 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 the
NavigationManager.NavigationManagerEventListener.onRouteUpdated(Route)callback method.Note: You can set the frequency of the route request by using
MANUAL- Provides notifications about upcoming traffic incidents and requires user confirmation before rerouting. For more information, see the next section.
DISABLE- Disables traffic-based rerouting.