HERE Android SDK Developer's Guide

TrafficRerouteListener

The class TrafficRerouteListener is a member of com.here.android.mpa.guidance.NavigationManager.

Class Summary

public static abstract class NavigationManager.TrafficRerouteListener

extends java.lang.Object

This adapter class receives notifications from NavigationManager that indicates traffic re-routing events due to the use of different NavigationManager.TrafficAvoidanceModes.

[For complete information, see the section Class Details]

See also:

setTrafficAvoidanceMode(TrafficAvoidanceMode)

Nested Class Summary

Table 1. Nested Classes in TrafficRerouteListener
Nested Classes

public static final enumeration NavigationManager.TrafficRerouteListener.TrafficEnabledRoutingState

Enum used to describes the current route re-calculation due to traffic's status.

Constructor Summary

Table 2. Constructors in TrafficRerouteListener
Constructors

TrafficRerouteListener ()

Method Summary

Table 3. Methods in TrafficRerouteListener
Methods

public void onTrafficRerouteBegin (TrafficNotification notification)

Callback that is triggered when traffic-based route re-calculation has begun as a result of of a TrafficNotification.

public void onTrafficRerouteFailed (TrafficNotification notification)

Callback that is triggered when traffic-based route re-calculation has failed.

public void onTrafficRerouteState (TrafficEnabledRoutingState state)

Callback to inform the user about current state of traffic enabled routing feature.

public void onTrafficRerouted (Route newRoute)

Deprecated: As of SDK 3.4.

Callback to indicate a new Route that has been calculated as a result of MANUAL being in use.

public void onTrafficRerouted (RouteResult newRouteResult)

Callback to indicate a new Route that has been calculated as a result of MANUAL being in use.

Class Details

This adapter class receives notifications from NavigationManager that indicates traffic re-routing events due to the use of different NavigationManager.TrafficAvoidanceModes.

It provides an empty implementation by default. Sub-class of this adapter can selectively override methods that are of interest.

See also:

setTrafficAvoidanceMode(TrafficAvoidanceMode)

Constructor Details

TrafficRerouteListener ()

Method Details

public void onTrafficRerouteBegin (TrafficNotification notification)

Callback that is triggered when traffic-based route re-calculation has begun as a result of of a TrafficNotification.

Parameters:

public void onTrafficRerouteFailed (TrafficNotification notification)

Callback that is triggered when traffic-based route re-calculation has failed.

Parameters:

public void onTrafficRerouteState (TrafficEnabledRoutingState state)

Callback to inform the user about current state of traffic enabled routing feature. Note that this callback will be triggered repeatedly during navigation.

Parameters:

  • state

    An enum TrafficEnabledRoutingState representing the current traffic enabled routing state.

See also:

setTrafficAvoidanceMode(TrafficAvoidanceMode)

public void onTrafficRerouted (Route newRoute)

Deprecated: As of SDK 3.4.

Instead use onTrafficRerouted(RouteResult).

Callback to indicate a new Route that has been calculated as a result of MANUAL being in use. The new Route is the fastest available at the time of the route calculation. Note: Clients can call setRoute(Route) to start using this new route.

Parameters:

  • newRoute

    The newly calculated Route.

public void onTrafficRerouted (RouteResult newRouteResult)

Callback to indicate a new Route that has been calculated as a result of MANUAL being in use. The new Route is the fastest available at the time of the route calculation. Note: Clients can call setRoute(Route) from RouteResult.getRoute() to start using this new route.

Parameters:

  • newRouteResult

See also:

getViolatedOptions()