public interface NavigationManager
| Modifier and Type | Method and Description |
|---|---|
boolean |
isRunning()
Returns true if the navigation is running, false otherwise
|
boolean |
removeUpdates()
Removes all location updates.
|
void |
requestNavigationUpdates(NavigationRequest request,
NavigationListener listener)
Set the navigation params, and the listener that receives the updated navigation progress.
|
boolean |
updateWithLocation(Location location)
Informs
NavigationManager object the change of the user's location |
void requestNavigationUpdates(NavigationRequest request, NavigationListener listener) throws java.lang.IllegalArgumentException
Can only exist one navigation with one listener at a time.
If this method was previously invoked, but removeUpdates() wasn't,
removeUpdates() is called internally.
request - NavigationRequest with navigation params. NavigationRequest.route can't be null, and
NavigationRequest.distanceToGoalThreshold and NavigationRequest.outsideRouteThreshold
must be greater than 0.listener - NavigationListener that receives updates of navigation progress.java.lang.IllegalArgumentException - if listener, request or NavigationRequest.route are null,
or if NavigationRequest.distanceToGoalThreshold or NavigationRequest.outsideRouteThreshold
have 0 or negative value.boolean updateWithLocation(Location location)
NavigationManager object the change of the user's locationlocation - new Location of the user. If null, nothing is doneboolean removeUpdates()
requestNavigationUpdates(NavigationRequest, NavigationListener),
so it won't receive more progress updates.boolean isRunning()