ev-map / EVMap

Android app to find electric vehicle charging stations - compatible with community databases such as GoingElectric.de and OpenChargeMap.org.
https://ev-map.app/
MIT License
200 stars 53 forks source link

Android Auto/Automotive: Search function while driving #262

Closed wkhom closed 1 year ago

wkhom commented 1 year ago

In current version for AAOS, search function is available but unfortunately not available when driving. Same for the close search button. Can this be changed?

johan12345 commented 1 year ago

The on-screen keyboard for search is not usable while driving - this is a restriction enforced by Google's Car App Library which we can't change. However, the "close search" button can definitely be enabled while driving, I will look into that.

Also, according to the design guidelines (page 52), it is supposed to be possible to show at least a search screen with the recent search results even while driving. I see this is working on Android Auto, when you first open the search screen and then start to drive (and I could enable that to work also when opening the search screen while driving).

Could you test on your AAOS car what happens when you do that? In my AAOS emulator it seems like this feature is not implemented, the search screen is completely disabled when you start to drive.

johan12345 commented 1 year ago

In my AAOS emulator it seems like this feature is not implemented, the search screen is completely disabled when you start to drive.

Ah, I was probably wrong with this observation. That is the case in the Polestar 2 emulator with Android 10 (unfortunately they don't provide a newer emulator image), but it works correctly (i.e. keyboard is disabled, but recent results are shown) on the generic AAOS emulator with Android 11. So I would assume it would also possible to use this feature on an actual AAOS car with up-to-date Android.

wkhom commented 1 year ago

With Polestar 2 the behavior is as follows: When I start driving after a search, the search result stay visible, and I can press the Reload button to refresh the results. However, there are no other options regarding search available while driving - all locked. If you want me to test some features, just let me know.. BR, Walter

BTW: I have checked the Plugshare AAOS app in parallel. They have achieved, that search function including voice input (Google Assistant) is working also when driving. But no idea how it is done.. maybe they do not use Google Template Host

johan12345 commented 1 year ago

What I meant is: Try to start driving while the search screen is open - in that case, you might get the behavior that you also see in Plugshare (recent results show and searching works with voice input, just no keyboard).

If that works correctly on the car, I can also enable the search button itself to work while driving (I did not enable it as it didn't work on the emulator).

wkhom commented 1 year ago

Ok understood. I will check in early afternoon and send some pics

wkhom commented 1 year ago

Here we go 20221209_151158 20221209_151335 20221209_151448 20221209_151656

johan12345 commented 1 year ago

Okay, thanks! Yes, then it looks like search while driving is indeed implemented by Polestar even though it wasn't working on the emulator. I'll try to enable it in the next update.

wkhom commented 1 year ago

Sounds great 👍

wkhom commented 1 year ago

Another topic (should be maybe in a seperate issue): When checking the price, the app crashes (not always but sometimes). Could not identify under what circumstances. I read similar from another user in the Polestar forum.. the following video I recorded today: https://youtube.com/shorts/yuRhwkUGX3Y?feature=share

johan12345 commented 1 year ago

Another topic (should be maybe in a seperate issue): When checking the price, the app crashes (not always but sometimes).

Oh yeah, I could now finally reproduce that issue in certain cases. Should also be fixed with the next release with https://github.com/johan12345/EVMap/commit/56712ff1affa4adc11ab98689c1f48774fc788a9 and https://github.com/johan12345/EVMap/commit/c489df2aaff591ccfae248de2c0d4e01acc63194.