Open dryaz opened 2 months ago
NavigationLauncher.startNavigation doesn't require activity, context is enough.
NavigationLauncher.startNavigation
https://github.com/maplibre/maplibre-navigation-android/blob/main/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/NavigationLauncher.java
getDefaultSharedPreferences
new Intent(activity, MapboxNavigationActivity.class);
activity.startActivity(navigationActivity);
In all 3 places where activity is used context should be enough.
NavigationLauncher.startNavigation
doesn't require activity, context is enough.https://github.com/maplibre/maplibre-navigation-android/blob/main/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/NavigationLauncher.java
getDefaultSharedPreferences
new Intent(activity, MapboxNavigationActivity.class);
activity.startActivity(navigationActivity);
In all 3 places where activity is used context should be enough.