EVMap icon indicating copy to clipboard operation
EVMap copied to clipboard

Android Auto: Allow to search for chargers along the route, near the destination, or along the driving direction

Open johan12345 opened this issue 4 years ago • 11 comments
trafficstars

would require access to the currently running navigation route, as requested in https://issuetracker.google.com/issues/204692004

johan12345 avatar Nov 01 '21 10:11 johan12345

A workaround that I have thought about: We might be able use the user's current location and speed to find out that the user is traveling on a highway/motorway in a certain direction, and then propose to show upcoming chargers along this road. This of course only works well if the user intends to stay on this road.

johan12345 avatar Jan 30 '22 13:01 johan12345

Another simpler workaround: Allow the user to find chargers within a bounding box along their driving direction.

johan12345 avatar Feb 06 '22 18:02 johan12345

And another idea: With notification access, we may be able to find out the user's current destination from the persistent notification from Google Maps. However it may be ambiguous (e.g. the notification may only contain the street address but not the postcode/city).

johan12345 avatar Aug 07 '22 09:08 johan12345

With #244, search for chargers along the current driving direction is now implemented.

As mentioned above, reliably implementing a search along the route or near the destination needs access to the current navigation route, which is not yet implemented in Android Auto.

johan12345 avatar Oct 13 '22 20:10 johan12345

Hello @johan12345,

I am also interested in such a feature and willing to implement parts. As far as I can see https://issuetracker.google.com/issues/204692004 is marked as fixed. Was the only change introduced with this fix the addCompassListener() used by https://github.com/johan12345/EVMap/pull/244 ? Does it mean we would still not be able to identify chargers near the route Google Maps is currently navigating to?

I would even like to extend this feature to show the diversion in minutes to reach a certain charger (if possible via the Google API).

twischer avatar Oct 25 '22 19:10 twischer

Hm, I am actually not sure why that issue has been marked as fixed - I cannot see any relevant updates in the changelog. I have just added a comment in the issue tracker to ask whether this was intentional.

johan12345 avatar Oct 25 '22 19:10 johan12345

Hello @johan12345,

looks like there is no progress from Google. I have two alternatives in mind:

  1. Allow the users to enter there own Google API key. So the Distance Matrix API can be used to sort the chargers by the distance to the current location and the minimal detour in minutes between current location and the destination. As far as I understand with a free API key 40,000 distances/month (200$/month / 0.005$) can be calculated 1
  2. Export available charging stations matching the filters in the EVMap app as Google Maps favorites. The favorites can be seen in the Google Maps app and in https://www.google.de/maps. Whenever the status of a charger changes add or remove it to the Google Maps favorites

What do you think about such approaches? Do you see already any issues with such solutions?

twischer avatar Mar 30 '23 17:03 twischer

Allow the users to enter there own Google API key. So the Distance Matrix API can be used to sort the chargers by the distance to the current location and the minimal detour in minutes between current location and the destination. As far as I understand with a free API key 40,000 distances/month (200$/month / 0.005$) can be calculated 1

Yes, that would probably be the API to use. However there would still need to be a way for EVMap to know what your current route / destination is (as discussed above). And adding your own API key is quite complex for non-technical users, but yes, looking at the size of the current user base it is probably necessary.

Export available charging stations matching the filters in the EVMap app as Google Maps favorites. The favorites can be seen in the Google Maps app and in https://www.google.de/maps. Whenever the status of a charger changes add or remove it to the Google Maps favorites

I think there is no way to dynamically update Google Maps favorites through an API...

johan12345 avatar Apr 02 '23 14:04 johan12345

there would still need to be a way for EVMap to know what your current route / destination is

For me it would be fine to enter the destination manually (like searching for chargers at a certain location). But it could also be extended by a feature of getting the destination from the current appointment in the Google calendar (like Google Maps does it)

I think there is no way to dynamically update Google Maps favorites through an API

So far I also did only found https://developers.google.com/maps/documentation/android-sdk/marker which seems not to fit for our needs because it cannot be combined with showing a route (as far as I understand),

twischer avatar Apr 04 '23 16:04 twischer