Where is Google maps navigation going?
Moderator: Martin
-
- Posts: 179
- Joined: 16 Oct 2019 17:38
Where is Google maps navigation going?
Hello,
Is there a way of detecting the destination after the navigation has started?
Thanks
Is there a way of detecting the destination after the navigation has started?
Thanks
Crude but it works.
-
- Posts: 179
- Joined: 16 Oct 2019 17:38
Re: Where is Google maps navigation going?
I searched the web and found nothing.
So I devised this crude solution.
Google navigation posts a notification on the status bar.
The following script extracts the destination.
trim = replace(notification_text, content_title, "");
trim = replace(trim, notification_sub_text, "");
trimlength = length(trim);
trimmed = left(trim, trimlength-12);
I'd still prefer the latitude and longitude.
So I devised this crude solution.
Google navigation posts a notification on the status bar.
The following script extracts the destination.
trim = replace(notification_text, content_title, "");
trim = replace(trim, notification_sub_text, "");
trimlength = length(trim);
trimmed = left(trim, trimlength-12);
I'd still prefer the latitude and longitude.
Crude but it works.
Re: Where is Google maps navigation going?
I have tried several times, the most you can get is the location name from the navigation notification. We can geocoding to get the lat long, using osm geocoding : https://nominatim.org/release-docs/develop/api/Search/
Unfortunately most location name are so vague that it can match with so many other similar location name in other state or country. I am still finding the way to limit the search within certain city, but can't get it right yet. You can try this
https://nominatim.openstreetmap.org/sea ... sdetails=1
The ressult is 10 locations. But actually we can loop search and find if the city is Mountain View, then that is the coordinate we want.
Other thing is that you should be careful with the search result, as it maybe wrong (because the name). You should try and not rely on it with 100% certainty.
Unfortunately most location name are so vague that it can match with so many other similar location name in other state or country. I am still finding the way to limit the search within certain city, but can't get it right yet. You can try this
https://nominatim.openstreetmap.org/sea ... sdetails=1
The ressult is 10 locations. But actually we can loop search and find if the city is Mountain View, then that is the coordinate we want.
Other thing is that you should be careful with the search result, as it maybe wrong (because the name). You should try and not rely on it with 100% certainty.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 179
- Joined: 16 Oct 2019 17:38
Re: Where is Google maps navigation going?
Thanks for taking the time to look into this for me. I ended up with the same result as you, which I agree is prone to error.
Don't waste time on this because I've searched online for the answer to no avail.
I'd like to take this opportunity to thank you for all you help provided to this forum. You have solved many a problem for me and I'm sure for many others.
Many thanks.
Don't waste time on this because I've searched online for the answer to no avail.
I'd like to take this opportunity to thank you for all you help provided to this forum. You have solved many a problem for me and I'm sure for many others.
Many thanks.
Crude but it works.
-
- Posts: 179
- Joined: 16 Oct 2019 17:38
Re: Where is Google maps navigation going?
Google must have noticed me searching for the solution and have now implemented it.
Works nicely.
Works nicely.
Crude but it works.
Re: Where is Google maps navigation going?
How do you achieve it? I have updated to the latest google maps and can't find the way yet, only live location sharing.Micky Micky wrote: ↑11 Dec 2019 20:36Google must have noticed me searching for the solution and have now implemented it.
Works nicely.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 179
- Joined: 16 Oct 2019 17:38
Re: Where is Google maps navigation going?
From the notification like you suggested.
Crude but it works.
Re: Where is Google maps navigation going?
Hmmm, I don't have any coordinates at all. Have tried so many navigation to multiple places, even point at map without names; no coordinates show up in the notification. It shows up similar to yours, but the coordinate replaced by name place. If it has no name, it shows "point on map". I am using Google Maps 10.31.1. Maybe there is some extra setting to pop this up. I have skimmed thru most of the setting and found none. Do you need extra setting to get this? Or maybe this is server side.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 179
- Joined: 16 Oct 2019 17:38
Re: Where is Google maps navigation going?
I'm on 10.30.2
I think I've figured it out.
I'm starting the navigation with START ACTIVITY using coordinates in the Data URI.
If I use Google maps app and enter a street name then the notification contains the street name.
But before it was definitely converting the coordinates into a street name in the notification.
I think I've figured it out.
I'm starting the navigation with START ACTIVITY using coordinates in the Data URI.
If I use Google maps app and enter a street name then the notification contains the street name.
But before it was definitely converting the coordinates into a street name in the notification.
Crude but it works.
Re: Where is Google maps navigation going?
Oh. If you use the data URI, then you already have the coordinate from the beginning. I am thinking about extracting the coordinate from the google map. As when you tap a point, google map will convert it to name place, which lead to possible wrong coordinates when we geocoding them back.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.