mapbox / mapbox-navigation-android-examples

Other
53 stars 46 forks source link

[Android-Auto] Updating mapbox dependencies #110

Closed narko closed 2 years ago

narko commented 2 years ago

This change will:

Right now there isn't any BottomSheet working in the mobile app, but all the functionality is working for the Android Auto counterpart.

@kmadsen could you guys help with the BottomSheet changes? I am not sure what the newer approach to do this is.

kmadsen commented 2 years ago

@Zayankovsky I see you migrated an app to support new search changes. Is there a solution we can pull over here?

Zayankovsky commented 2 years ago

@Zayankovsky I see you migrated an app to support new search changes. Is there a solution we can pull over here?

Almost all of the views were removed from Search SDK. There are only SearchResultsView and SearchPlaceBottomSheetView now. So if you need to replicate the exact views you had, you will have to copy-paste them. We can also implement a simpler version of what we had using the remaining two views.

kmadsen commented 2 years ago

@narko do you want to do this here? Copy paste these two files into this PR and revert the commented out code.

https://github.com/mapbox/mapbox-search-android/blob/v1.0.0-beta.32/MapboxSearch/ui/src/main/java/com/mapbox/search/ui/view/SearchBottomSheetView.kt

https://github.com/mapbox/mapbox-search-android/blob/v1.0.0-beta.32/MapboxSearch/ui/src/main/java/com/mapbox/search/ui/view/place/SearchPlaceBottomSheetView.kt

narko commented 2 years ago

@kmadsen thanks! I'll add that later today.

narko commented 2 years ago

@kmadsen I have tried to copy the files you mentioned, but not sure if I missed something. It looks like those classes need some code that is marked as internal in the mapbox-search-android lib. For example: import com.mapbox.search.ui.utils.extenstion.* (btw, I think there is a typo in extenstion)

Zayankovsky commented 2 years ago

I don't think copying the old views is the right approach here, too much code has to be copied for that.

narko commented 2 years ago

Thanks @Zayankovsky! I had the same feeling after I got AS crying in red. What would be the alternative?

kmadsen commented 2 years ago

Oh sorry, I didn't understand the recommendation.

How I originally added search to this repository was taking the examples from the search repository. So that may be the better place to look, see what the latest and greatest versions are.

https://github.com/mapbox/mapbox-search-android/tree/main/MapboxSearch/sample

kmadsen commented 2 years ago

Hi @narko I spent some time on updating search and it was a relatively large change.

The mapbox search SDK is under construction so migrating may have another migration soon. I'm punting on the "in app search" effort, and bringing different efforts to the table. We have been working on a drop-in-ui that makes for a full blown turn by turn experience with very little code.

So I've added it here https://github.com/mapbox/mapbox-navigation-android-examples/pull/127, and then we'll be good to update this repository without any issues.

narko commented 2 years ago

Thanks for the heads-up @kmadsen. The new functionality on the video looks really great! I guess once your change is merged, this PR is not needed.

kmadsen commented 2 years ago

The new functionality on the video looks really great! I guess once your change is merged, this PR is not needed.

Yeah closing here, thank you for your contributions here it was definitely helpful! Sorry I didn't have good advice, I needed to dig in to figure out what we should do.

Also, you should be good to go with AAOS! Please let us know if you have any more issues.