Skip to content
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

Car App library 1.7.0 - pan & zoom for maps on Android Auto / AAOS #324

Merged
merged 3 commits into from
Aug 11, 2024

Conversation

johan12345
Copy link
Collaborator

@johan12345 johan12345 commented Apr 5, 2024

The first alpha version of Car App Library 1.7.0 was released very recently. This might allow us to make improvements on some long-standing issues:

  • The new MapWithContentTemplate is now available starting with Car API level 7. This seems to finally make it possible to pan and zoom the map (Android Auto/Automotive: Pan and zoom the map #184). We'll have to check whether that feature is already implemented in the host apps (Android Auto app & AAOS Template Host).
  • It should fix the common crash "java.lang.IllegalArgumentException: Invalid speed unit: 0" on some Volvo/Polestar cars (diff, issue)

@johan12345
Copy link
Collaborator Author

johan12345 commented Apr 10, 2024

The new MapWithContentTemplate seems to be a bit more effort to implement than expected, as it requires us to render the map ourselves. For that we will be using Mapbox/OSM - Google Maps is not available, at least not on AAOS.

The upside is that rendering the map ourselves (which was previously not possible for POI apps) gives us a lot more flexibility, e.g. with how we display markers on the map etc. - so we could make it work a lot more like in the phone app.
With some refactoring, we could probably reuse some of the marker handling code that we have already implemented for the phone app.

@johan12345 johan12345 force-pushed the car-app-lib-1.7.0 branch 4 times, most recently from cdd842c to 7d770b7 Compare May 5, 2024 21:24
@johan12345 johan12345 force-pushed the car-app-lib-1.7.0 branch from 7d770b7 to ddff549 Compare May 9, 2024 21:07
@johan12345 johan12345 force-pushed the car-app-lib-1.7.0 branch 4 times, most recently from 37b2083 to f96af5f Compare May 25, 2024 11:19
@johan12345 johan12345 force-pushed the car-app-lib-1.7.0 branch 2 times, most recently from 2dde202 to fdfd081 Compare June 2, 2024 20:40
@johan12345
Copy link
Collaborator Author

Screen recording of the current state:

Screen_recording_20240602_222542.mp4

@johan12345
Copy link
Collaborator Author

johan12345 commented Jun 2, 2024

To do:

  • Implement place search
  • Shift the focus on the map a bit more to the right (based on the visibleArea) so that the current location is shown in the center of the visible area
  • Debug zooming with focus point (currently disabled, we always zoom towards the center)
  • Test on Android Auto
  • Try if we can use Google Maps on Android Auto, currently it's hardcoded to MapLibre

@johan12345 johan12345 marked this pull request as ready for review August 11, 2024 20:07
@johan12345 johan12345 changed the title Car App library 1.7.0 Car App library 1.7.0 - pan & zoom for maps on Android Auto / AAOS Aug 11, 2024
@johan12345 johan12345 merged commit fa04092 into master Aug 11, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant