navit-gps / navit

The open source (GPL v2) turn-by-turn navigation software for many OS
http://www.navit-project.org
Other
561 stars 174 forks source link

Android Auto integration #1062

Open fireclawthefox opened 4 years ago

fireclawthefox commented 4 years ago

Description

It would be nice to enable navit to be used in Android Auto So one isn't forced to use google maps or Waze.

information

Here are some informational links about this topic.

hoehnp commented 4 years ago

Despite a bit offtopic, I would add, it would be even nicer if we could replace Android Auto with a solution based on DeepSpeech. Especially as to my understanding Android Auto means navit wouldn't work offline anymore. I would prefer to realize it as an independent app which uses the dbus interface of Navit. What are the thoughts of others?

fireclawthefox commented 4 years ago

I haven't read the documentation about Android Auto in depth yet but I haven't seen anything that stated that apps must be online. Maybe you could link me to the part that describes that. Adding DeepSpeech will probably be a nice addition, though not a replacement for Android Auto as that's not only speech input. Though, DeepSpeech or something similar may be required for getting navit's Android Auto support in the official app store, need to re-check the requirements for that again to be sure. Also I don't mind which way is used to get navit to show up in Android Auto, I just like to get it displayed on my Car screen which afaik Android Auto is currently the only way to do so.

hoehnp commented 4 years ago

What I was referring to when thinking about online is speech input. Do you know if Android Auto manages that also offline?

fireclawthefox commented 4 years ago

I haven't ever used speech input with my phone and/or android auto at all but from a quick test it seems to work offline. I guess it also shouldn't matter how speech input is processed as long as it's present at all.

mvglasow commented 4 years ago

@fireclawthefox Could you give us a brief summary of what we would need to add to Navit in order for it to work with Android Auto?

Once we have an idea of what it would take for that, the main points that need addressing IMHO are:

As for adding an interface to a cloud-based/proprietary speech-to-text engine, while the cloud-only/proprietary part is not nice, I can live with that if it is just an interface, that is, should the external service not be available, Navit will continue to work normally otherwise.

Re DeepSpeech/Dbus, that concerns the Linux port. It probably won’t work on Android and vice versa. If we want STT support on both platforms (and I would assume Android and Linux to be our most widely used platforms), we will need to implement both. Ideally, if that is feasible, we would implement a platform-independent, low-level speech input module to handle the generic stuff, and a platform-specific plugin on top to interface with the platform-specific STT module.

That is in principle similar to the approach I took for live traffic: rather than just implement a monolith that allows connection of a TMC dongle on Android, there is a generic traffic module plus a platform/provider-specific one (granted, currently there is only support for TraFF on Android, but other traffic sources on other platforms could be implemented in the same manner). TMC is one of the possible sources, but the location and event parsing is done in an external app.

fireclawthefox commented 4 years ago

@mvglasow I've tried to get all the requirements that'd be needed for the integration. I guess some of them are already satisfied by navit and some others just have to be acknowledged when creating the android auto specific UI.

Requirements according to documentation

  1. Follow Design Guidelines https://developer.android.com/training/cars/Android%20for%20Cars%20App%20Library%20design%20guidelines.pdf
    1. Minimize User interactions (Navit is probably already quite good at this)
    2. Design for in-car views.
      1. Must use Android Auto templates, Background color (except Map and Buttons), Screen Header, Typography
      2. No more than 5 views for a task flow (2-3 recommended)
      3. Use font of at least 24dpi on maps unless it is paired with a visual element (such as a route or road) or is relatively static on the display
      4. avoid UI elements that enable map interactivity (zoom, pan, and drag are not supported)
      5. meet or exceed minimum size of 36 x 36dp for images, icons, and map markers
      6. Don’t create multi-stop journeys
    3. “Automatic” Change of light/dark interface
    4. Chromatic Icons

Quality Must haves (specific to Navit)

  1. No Animated elements (except if they aid in navigation)
  2. Don’t activate phone screen
  3. No automatic scrolling text (I think there wasn't any in navit by default anyways)
  4. Icons must comply with contrast requirements https://developers.google.com/cars/design/android-auto/design-system/color#contrast
  5. Must Support navigation intents
  6. Reaction time for buttons is at max 2 seconds
  7. App must launch within 10 seconds
  8. App must load content within 10 seconds
  9. App must restore previous state when relaunched from home
  10. Use Navigation Audio channel for navigation instructions
  11. Must use correct navigation template components for displaying Text-based turn-by-turn directions, lane guidance, and estimated arrival time. Extra content (Speed limit, etc) can be displayed to the right
  12. Must trigger navigation notifications for text-based turn-by-turn directions
  13. Must send next-turn information to the vehicle’s cluster display when using Text-based turn-by-turn directions
  14. Must handle navigation requests from other Android Auto apps
  15. Must draw a light-themed or dark-themed map when instructed to do so
  16. Must provide a “test drive” mode that simulates driving