public class VenueNavigationManager
extends java.lang.Object
IMPORTANT: Venue Navigation Manager is a Beta feature. The related classes are subject to change without notice.
| Modifier and Type | Class and Description |
|---|---|
static class |
VenueNavigationManager.NavigationState
The possible states of
VenueNavigationManager. |
static class |
VenueNavigationManager.TrackingMode
The mode that is used when map tracking is enabled.
|
static class |
VenueNavigationManager.TrackingTilt
The tilt that is used when map tracking is enabled.
|
static interface |
VenueNavigationManager.VenueNavigationManagerListener
An interface for responding to navigation events sent by the
VenueNavigationManager. |
| Modifier and Type | Field and Description |
|---|---|
static float |
INVALID_DISTANCE_VALUE
Represents an invalid distance value.
|
static long |
INVALID_TIME_INTERVAL_VALUE
Represents an invalid time interval value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(VenueNavigationManager.VenueNavigationManagerListener listener)
Adds a listener to the navigation manager.
|
boolean |
areBeepsEnabled() |
float |
getAverageSpeed()
Returns the current average speed in the current navigation session.
|
VenueManeuver |
getCurrentManeuver()
Returns the current, upcoming VenueManeuver in the current navigation session.
|
float |
getDistanceFromStart()
Returns the current distance from the start point of navigation.
|
float |
getDistanceToCurrentManeuver()
Returns the remaining distance to the current VenueManeuver.
|
float |
getDistanceToDestination()
Returns the current distance to destination.
|
float |
getDistanceToNextManeuver()
Returns the remaining distance to the next VenueManeuver after the current one.
|
float |
getManeuverZoomDistance()
Gets the distance from the maneuver at which the maneuver zoom is active.
|
float |
getManeuverZoomLevel()
Gets the level to which to zoom in when the maneuver zoom is active.
|
VenueNavigationManager.TrackingMode |
getMapTrackingMode()
Returns map tracking mode.
|
VenueNavigationManager.TrackingTilt |
getMapTrackingTilt()
Returns how the map is tilted when map tracking is enabled.
|
VenueNavigationManager.NavigationState |
getNavigationState()
Gets the current state of the navigation related to the tracked route.
|
VenueManeuver |
getNextManeuver()
Returns the next VenueManeuver after the current VenueManeuver in the current navigation
session.
|
long |
getReroutingTimeout()
Returns the time interval in seconds, after which the route will be recalculated in case the
user moves far away from the current route.
|
long |
getTimeToArrival()
Returns the number of seconds that remain to travel to the destination,
or
VenueNavigationManager.INVALID_TIME_INTERVAL_VALUE on error. |
float |
getTravelledDistance()
Returns the travelled distance in the current navigation session.
|
Venue |
getVenue()
Returns the
Venue object where the navigation is taking place. |
VenueLayerAdapter |
getVenueLayer() |
boolean |
isManeuverZoomEnabled()
Returns wether zooming in on maneuvers is enabled during navigation.
|
boolean |
isMapTrackingEnabled()
Returns
true, if @code VenueNavigationManager is allowed to automatically
update map position as navigation progresses, false otherwise. |
boolean |
isPaused()
Returns
true, if current navigation is paused, false otherwise. |
boolean |
isVibrationEnabled()
Returns whether device vibration is enabled during navigation.
|
void |
pause(boolean value)
When set to
true, the current navigation will be paused (if any). |
void |
removeListener(VenueNavigationManager.VenueNavigationManagerListener listener)
Removes a listener from the navigation manager.
|
void |
setBeepsEnabled(boolean enabled)
Enables/disables device beep sounds during navigation.
|
void |
setManeuverZoomDistance(float distance)
Sets the distance from the maneuver at which the maneuver zoom is active.
|
void |
setManeuverZoomEnabled(boolean enabled)
Enables/disables zooming in on maneuvers during navigation.
|
void |
setManeuverZoomLevel(float level)
Sets the level to which to zoom in when the maneuver zoom is active.
|
void |
setMapTrackingEnabled(boolean value)
Allows the
VenueNavigationManager to automatically update map position as
navigation progresses. |
void |
setMapTrackingMode(VenueNavigationManager.TrackingMode value)
Controls how the map is moved and rotated when map tracking is enabled.
|
void |
setMapTrackingTilt(VenueNavigationManager.TrackingTilt value)
Controls how the map is tilted when map tracking is enabled.
|
void |
setReroutingTimeout(long timeoutInSeconds)
Sets the rerouting timeout in seconds.
|
void |
setVibrationEnabled(boolean enabled)
Enables/disables device vibration during navigation.
|
boolean |
start(LinkingRoute routeSection,
CombinedRoute route)
Starts a turn-by-turn navigation session using the specified linking route section.
|
boolean |
start(VenueRoute routeSection,
CombinedRoute route)
Starts a turn-by-turn navigation session using the specified venue route section.
|
void |
stop()
Stops a turn-by-turn navigation session started via
VenueNavigationManager.start(VenueRoute, CombinedRoute). |
public static final float INVALID_DISTANCE_VALUE
public static final long INVALID_TIME_INTERVAL_VALUE
public VenueNavigationManager.NavigationState getNavigationState()
public boolean isPaused()
true, if current navigation is paused, false otherwise.true, if current navigation is paused, false otherwise.public void pause(boolean value)
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.value - When set to true, the current navigation will be paused (if any).public boolean isMapTrackingEnabled()
true, if @code VenueNavigationManager is allowed to automatically
update map position as navigation progresses, false otherwise.
By default returns true.true, if @code VenueNavigationManager is allowed to automatically
update map position as navigation progresses, false otherwise.public void setMapTrackingEnabled(boolean value)
VenueNavigationManager to automatically update map position as
navigation progresses.value - true to enable map tracking, false otherwise.public VenueNavigationManager.TrackingTilt getMapTrackingTilt()
VenueNavigationManager.TrackingTilt.TILT3D.public void setMapTrackingTilt(VenueNavigationManager.TrackingTilt value)
value - VenueNavigationManager.TrackingTilt value to define how the map is tilted when map
tracking is enabled.public VenueNavigationManager.TrackingMode getMapTrackingMode()
VenueNavigationManager.TrackingMode.FOLLOW.public void setMapTrackingMode(VenueNavigationManager.TrackingMode value)
value - VenueNavigationManager.TrackingMode value to define how the map is moved when map
tracking is enabled.public void addListener(VenueNavigationManager.VenueNavigationManagerListener listener)
VenueNavigationManager.VenueNavigationManagerListener interface. The listener receives event
callbacks containing information about the current navigation session.listener - The VenueNavigationManager.VenueNavigationManagerListener object to be added.public void removeListener(VenueNavigationManager.VenueNavigationManagerListener listener)
VenueNavigationManager.VenueNavigationManagerListener interface. The listener receives event
callbacks containing information about the current navigation session.listener - The VenueNavigationManager.VenueNavigationManagerListener object to be removed.public boolean start(VenueRoute routeSection, CombinedRoute route)
routeSection - The venue route section to navigate.route - The route used to navigate.public boolean start(LinkingRoute routeSection, CombinedRoute route)
routeSection - The linking route section to navigate.route - The route used to navigate.public void stop()
VenueNavigationManager.start(VenueRoute, CombinedRoute).public VenueLayerAdapter getVenueLayer()
VenueLayerAdapter object for this instance of navigation manager.public Venue getVenue()
Venue object where the navigation is taking place.Venue object where the navigation is running.
If the navigation is started with the LinkingRoute route section,
then the returned Venue object will be null.public VenueManeuver getCurrentManeuver()
VenueManeuver. Can be null, if
navigation hasn't been started.public VenueManeuver getNextManeuver()
VenueManeuver after the current one.
Can be null, if navigation hasn't been started or when the current VenueManeuver is
the last one.VenueNavigationManager.getCurrentManeuver()public float getDistanceToCurrentManeuver()
VenueNavigationManager.INVALID_DISTANCE_VALUE if an error occured or if the
upcoming maneuver is not available yet.VenueNavigationManager.getCurrentManeuver()public float getDistanceToNextManeuver()
VenueNavigationManager.INVALID_DISTANCE_VALUE if an error occurred or if the
next maneuver is not available yet.VenueNavigationManager.getNextManeuver()public float getDistanceToDestination()
VenueNavigationManager.INVALID_DISTANCE_VALUE if an error occurred or
navigation hasn't been started.public float getDistanceFromStart()
VenueNavigationManager.INVALID_DISTANCE_VALUE if an error occurred or
navigation hasn't been started.public float getTravelledDistance()
public float getAverageSpeed()
public long getTimeToArrival()
VenueNavigationManager.INVALID_TIME_INTERVAL_VALUE on error.public long getReroutingTimeout()
VenueNavigationManager.setReroutingTimeout(long),
VenueNavigationManager.VenueNavigationManagerListener.onRerouteBegin()public void setReroutingTimeout(long timeoutInSeconds)
timeoutInSeconds - Time interval in seconds.VenueNavigationManager.getReroutingTimeout()public boolean areBeepsEnabled()
VenueNavigationManager.setBeepsEnabled(boolean)public void setBeepsEnabled(boolean enabled)
enabled - Flag to indicate the enable state of device beep sounds.VenueNavigationManager.areBeepsEnabled()public boolean isVibrationEnabled()
true if device vibration is enabled during navigation.VenueNavigationManager.setVibrationEnabled(boolean)public void setVibrationEnabled(boolean enabled)
enabled - Flag to indicate the enable state of device vibration.java.security.AccessControlException - in case when there are no android.permission.VIBRATE permission granted.public boolean isManeuverZoomEnabled()
true if zooming in on maneuvers is enabled during navigation,
and false otherwise.public void setManeuverZoomEnabled(boolean enabled)
enabled - Flag to indicate the enable state of maneuver zooming.public float getManeuverZoomDistance()
public void setManeuverZoomDistance(float distance)
distance - The distance to the maneuver in meters.public float getManeuverZoomLevel()
public void setManeuverZoomLevel(float level)
level - The zoom level.