Package es.situm.sdk.navigation
Interface NavigationManager
public interface NavigationManager
Central point to update the progress of a user when follows a route
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddNavigationListener(NavigationListener listener) Adds aNavigationListenerthat will receive the navigation events.getRoute()Returns the initial route requested to navigate when callingrequestNavigationUpdates(NavigationRequest)In case there is no on-going navigation, null will be returned.booleanReturns true if the navigation is running, false otherwisevoidIf any, removes all theNavigationListeners previously subscribed.voidremoveNavigationListener(NavigationListener listener) Removes the givenNavigationListener.booleanRemoves all location updates.voidRequest navigation updates using the givenNavigationRequest.voidrequestNavigationUpdates(NavigationRequest navigationRequest, DirectionsRequest directionsRequest, Handler<Route> callback) Request navigation updates.voidrequestNavigationUpdates(NavigationRequest request, NavigationListener listener) Request navigation updates using the givenNavigationRequestand sets the listener that receives the updated navigation progress.voidupdateNavigationState(ExternalNavigation externalNavigation) For internal use onlybooleanupdateWithLocation(Location location) InformsNavigationManagerobject the change of the user's location
-
Method Details
-
updateWithLocation
InformsNavigationManagerobject the change of the user's location- Parameters:
location- newLocationof the user. If null, nothing is done- Returns:
- true if there is a listener to which notify progress update. False if there isn't, so this method do nothing.
-
removeUpdates
boolean removeUpdates()Removes all location updates. This removes the internal state of the manager, including the listener provided inrequestNavigationUpdates(NavigationRequest, NavigationListener), so it won't receive more progress updates.- Returns:
- true if a listener was removed. False if there was no listener.
-
isRunning
boolean isRunning()Returns true if the navigation is running, false otherwise -
getRoute
Returns the initial route requested to navigate when callingrequestNavigationUpdates(NavigationRequest)In case there is no on-going navigation, null will be returned.