mapbox / mapbox-navigation-android-examples

Other
53 stars 46 forks source link

Update android auto #88

Closed kmadsen closed 2 years ago

kmadsen commented 2 years ago

Integrated maps extension-androidauto-v0.1.0

We now have a permanent solution and versioned releases for MapboxCarMap 🪂 🎉

Features - Enable navigation simulation from the command line

Solution for NF-7 https://github.com/mapbox/mapbox-navigation-android-examples/issues/81

See MapboxCarNavigationManager, MainCarSession, and ReplayRouteTripSession

Documentation: https://developer.android.com/training/cars/apps/navigation#simulating-navigation

1. Start the desktop head unit
2. Open your navigation app
3. $ adb shell dumpsys activity service com.mapbox.navigation.examples.androidauto.car.MainCarAppService AUTO_DRIVE

^ This is the command your app will use. Point it to the path of the CarAppService

https://user-images.githubusercontent.com/3021882/165796886-0a687eb5-bfb5-43e5-89a3-70a694710123.mov

MapboxNavigationApp integrations

MapboxNavigationApp.getObserver allows you to share instances of MapboxNavigationObserver between the car and app. See references to MapboxNavigationApp.getObserver(CarAppLocation::class) for examples.

Preparing for navigation sdk

Refactoring and deleting unneeded files as we prepare for a nav-sdk https://github.com/mapbox/mapbox-navigation-android/pull/5704