Search in sources :

Example 1 with NavigationManagerEventListener

use of com.here.android.mpa.guidance.NavigationManager.NavigationManagerEventListener in project here-android-sdk-examples by heremaps.

the class NavigationController method startDefaultNavigation.

private void startDefaultNavigation(Route route) {
    Log.d(TAG, "startDefaultNavigation");
    defaultMapRoute = new MapRoute(route);
    map.addMapObject(defaultMapRoute);
    map.getPositionIndicator().setVisible(true);
    defaultNavigationManager.setMap(map);
    defaultNavigationManager.setMapUpdateMode(NavigationManager.MapUpdateMode.ROADVIEW);
    // Use one of the gps simulation app(e.g. Lockito) with following coordinates from
    // GPX file https://pastebin.pl/view/0be4bad7
    defaultNavigationManager.startNavigation(route);
    defaultNavigationManager.addRerouteListener(new WeakReference<RerouteListener>(defaultRerouteListener));
    defaultNavigationManager.addNavigationManagerEventListener(new WeakReference<NavigationManagerEventListener>(defaultNavEventListener));
}
Also used : MapRoute(com.here.android.mpa.mapping.MapRoute) RerouteListener(com.here.android.mpa.guidance.NavigationManager.RerouteListener) NavigationManagerEventListener(com.here.android.mpa.guidance.NavigationManager.NavigationManagerEventListener)

Aggregations

NavigationManagerEventListener (com.here.android.mpa.guidance.NavigationManager.NavigationManagerEventListener)1 RerouteListener (com.here.android.mpa.guidance.NavigationManager.RerouteListener)1 MapRoute (com.here.android.mpa.mapping.MapRoute)1