-
Notifications
You must be signed in to change notification settings - Fork 144
[Android Auto] Support for onTap event in MapboxCarMapGestureHandler #1490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I just realized I should have posted this rather here: https://github.com/mapbox/mapbox-maps-android |
Excited that support for this is moving. But it's not quite ready for production. Currently, it is part of 1.2.0 which is a release candidate. The api is experimental, and it requires a special configuration in order to get api level 5 and there are only 4 levels supported by the desktop-head-unit. For the reason, considering this issue blocked. |
A related issue that could be looked into, is that the SDK does not support upgrading to the experimental api. Essentially, the This issue was known in development, because the car library does not allow for multiple subscriptions to the surface callback https://issuetracker.google.com/u/0/issues/200592099. It also looks like that is something google is addressing so we may have better support for this in the future. |
Agree with this! Once the api is stable this should be a simple update. I was considering a bigger refactor to decouple the sdk from experimental apis in the SurfaceCallback, but the solutions i tried would not help because the |
@narko the navigation SDK includes a screen that allows you to select POI from the screen. Take a look at PlacesListOnMapScreen |
Thanks @kmadsen! As far as I understood that example is setting the |
@narko Yeah that is correct. That has been the android auto solution that google provided as an alternative to tapping directly on the map. as you can see, basic map panning and zooming was added a year ago in 1.1
As far as I can tell, this is not supported by android auto head units at the moment. I spoke with some of the CarPlay developers, and this is also a limitation on their end. It does look like api support is coming, but you will need to wait for a stable api in order to use it (my guess is ~6 months but that is just my guess and maybe it is less or more). We will be adding support for it when it is available This issue can track when we add support for it after google provides stable support for surface taps |
@kmadsen API 5 seems to be supported now, which includes the
Features annotated with API level 5 are compatible with Android Auto 7.9 and above. |
@kmadsen I have created a WIP PR, where I am trying to add support for this using the androidx.car.app version 1.3.0-alpha01. I know that AA is not on 7.9 (in Google Play), but I'd like to give this a try using some AA betas. Would you mind if I ask a question directly on the PR changes? |
@kmadsen added this feature in https://github.com/mapbox/mapbox-maps-android/releases/tag/extension-androidauto-v0.3.0 🎉 |
This feature is about allowing users to tap on the map similarly to how
mapSurface.getMapboxMap().addOnMapClickListener
works.This would allow users to tap on a specific POI and do things like opening a new
Screen
.Not sure if this is supported somehow. I have tried to build something similar by using a
MapboxObserver
and adding the following on theonAttach
method, but it didn't work for me:androidx.car.app.SurfaceCallback
supports onClick events already:That means that it would be quite straightforward to support that functionality in
MapboxCarMapGestureHandler
(unless I missed something down the line).The text was updated successfully, but these errors were encountered: