mapbox / mapbox-navigation-android

Mapbox Navigation SDK for Android
https://docs.mapbox.com/android/navigation/overview/
Other
617 stars 319 forks source link

[Android Auto] Make feedback items customizable in higher level screens #5804

Closed kmadsen closed 1 year ago

kmadsen commented 2 years ago

The feedback items are already customizable when you create your own Screen and Template. All you have to do is create a list of CarFeedbackItem from the CarFeedbackItemProvider and use CarFeedbackAction and show the CarGridFeedbackScreen.

What is not customizable, is if you're using a higher level screen such as CarRoutePreviewScreen or MainScreenManager. Then the feedback items are hard coded.

Solution here seems as simple as, adding CarFeedbackItemProvider to the constructor of screens. Null could disable the feedback action. But there is refactoring needed to extract the hard coded feedback items https://github.com/mapbox/mapbox-navigation-android/blob/623705630c6b2cf20e16db82bbd56c5264bfdde4/libnavui-androidauto/src/main/java/com/mapbox/androidauto/car/feedback/ui/CarFeedbackItem.kt#L38-L41

EDIT:

When updating the car feedback implementation. Please update the public documentation to include a section about how feedback works in android auto https://github.com/mapbox/android-docs/pull/2087

Guardiola31337 commented 1 year ago

cc'ing @Zayankovsky for visibility as he's working on new Feedback UI implementation.

Refs. https://github.com/mapbox/1tap-android/issues/2149