HERE Android SDK Developer's Guide

CombinedNavigationManager

The class CombinedNavigationManager is a member of com.here.android.mpa.venues3d .

Class Summary

public class CombinedNavigationManager

extends java.lang.Object

A navigation manager class that provides guidance advice and information along a combined route.

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in CombinedNavigationManager
Nested Classes

public static abstract interface CombinedNavigationManager.CombinedNavigationManagerListener

An interface for responding to navigation events sent by the CombinedNavigationManager .

public static final enumeration CombinedNavigationManager.CombinedNavigationState

The possible states of CombinedNavigationManager .

public static final enumeration CombinedNavigationManager.CombinedNavigationType

Specifies the possible types of navigation.

Field Summary

Table 2. Fields in CombinedNavigationManager
Fields

public static final double INVALID_DISTANCE_VALUE

Represents an invalid distance value.

Method Summary

Table 3. Methods in CombinedNavigationManager
Methods

public void addListener (CombinedNavigationManagerListener listener)

Adds a listener to the navigation manager.

public CombinedNavigationType getCurrentNavigationType ()

Returns the type of currently active navigation.

public double getDistanceFromStart ()

Returns the current distance from the start point of navigation.

public double getDistanceToDestination ()

Returns the current distance to destination.

public CombinedNavigationState getNavigationState ()

Gets the current state of the navigation related to the tracked route.

public boolean isPaused ()

Returns true , if current navigation is paused, false otherwise.

public void pause (boolean value)

When set to true , the current navigation will be paused (if any).

public void removeListener (CombinedNavigationManagerListener listener)

Removes a listener from the navigation manager.

public boolean simulate (CombinedRoute route, double speed, boolean distortionEnabled, double updateInterval)

Starts a turn-by-turn navigation simulation session using the specified combined route.

public boolean start (CombinedRoute route)

Starts a turn-by-turn navigation session using the specified combined route.

public void stop ()

Stops a turn-by-turn navigation session started via start(CombinedRoute) or simulate(CombinedRoute, double, boolean, double)

Class Details

A navigation manager class that provides guidance advice and information along a combined route.

IMPORTANT: Combined Navigation Manager is a Beta feature. The related classes are subject to change without notice.

Field Details

public static final double INVALID_DISTANCE_VALUE

Represents an invalid distance value.

See also:

getDistanceFromStart()

getDistanceToDestination()

Method Details

public void addListener (CombinedNavigationManagerListener listener)

Adds a listener to the navigation manager. The listener must implement the CombinedNavigationManager.CombinedNavigationManagerListener interface. The listener receives event callbacks containing information about the current navigation session.

Parameters:

public CombinedNavigationType getCurrentNavigationType ()

Returns the type of currently active navigation.

public double getDistanceFromStart ()

Returns the current distance from the start point of navigation.

Returns:

the distance from the start point in meters. Returns INVALID_DISTANCE_VALUE if an error occurred or navigation hasn't been started.

public double getDistanceToDestination ()

Returns the current distance to destination.

Returns:

the distance to destination in meters. Returns INVALID_DISTANCE_VALUE if an error occurred or navigation hasn't been started.

public CombinedNavigationState getNavigationState ()

Gets the current state of the navigation related to the tracked route.

public boolean isPaused ()

Returns true , if current navigation is paused, false otherwise.

Returns:

true, if current navigation is paused, false otherwise.

public void pause (boolean value)

When set to true , the current navigation will be paused (if any). When set to false , the current navigation will resume if previously paused. This has no effect if there is no navigation currently in progress.

Parameters:

  • value

    When set to true, the current navigation will be paused (if any).

public void removeListener (CombinedNavigationManagerListener listener)

Removes a listener from the navigation manager. The listener must implement the CombinedNavigationManager.CombinedNavigationManagerListener interface. The listener receives event callbacks containing information about the current navigation session.

Parameters:

public boolean simulate (CombinedRoute route, double speed, boolean distortionEnabled, double updateInterval)

Starts a turn-by-turn navigation simulation session using the specified combined route.

Parameters:

  • route

    The combined route section to navigate.

  • speed

    The speed at which the simulated location changes in meters per second.

  • distortionEnabled

    If enabled, each generated position will be distorted with some random factor

  • updateInterval

    Specifies how often the new position will be updated. I.e. it controls smoothness of the navigation simulation.

Returns:

True if started successfully and false otherwise, indicatiing that one of the route sections is invalid or the navigation is already running.

public boolean start (CombinedRoute route)

Starts a turn-by-turn navigation session using the specified combined route.

Parameters:

  • route

    The combined route section to navigate.

Returns:

True if started successfully and false otherwise, indicatiing that one of the route sections is invalid or the navigation is already running.

public void stop ()

Stops a turn-by-turn navigation session started via start(CombinedRoute) or simulate(CombinedRoute, double, boolean, double)