I have a simple Android app which should be able to allow navigation between 2 GeoPoint
's.
I can easily display a GeoPoint
on Waze, writing this small piece of code:
String uri = "waze://?ll=40.761043, -73.980545&z=10";
startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri)));
But, what I really need is a way to display navigation directions between 2 points.
I've tried to locate the correct BroadcastReciever
in the Waze source, but I stopped follow when it got to native calls (JNI) because I have no idea where the actual call is... I reached only to the URIHandler
signature, with no success finding the implementation...
Any ideas?
Thanks.
To navigate to a specific location: Open the Waze Live Map and search for your location. Either type in the search box or zoom in and click on a specific segment of the map. Click the share icon in the bottom-right corner of the map. A dialog appears. Click Share driving directions, then copy and paste the link.
The Waze application can then locate an address, mark an address on the map, or start a navigation session to an address or destination, based on which parameters you pass to this URL. Whether Waze opens as a client app or a web page depends on the user's system configuration:
Now, for two of the selected apps (Waze and HERE WeGo), we can only navigate from where we are to a destination point, whereas in Google Maps you can set it up to navigate from any place (even if you’re not there) to any intended destination. Let’s start by adding the code for Waze.
We take the URL that Waze knows how to handle, put the latitude and longitude where they should inside it; then, we launch an intent and wait for the intent app chooser to show Waze (if it’s installed in the phone) and select it. That’s it.
Fix you uri to:
String uri = "waze://?ll=40.761043, -73.980545&navigate=yes";
(added navigate=yes) and you should be good.
If this is still relevant you can use this:
String uri = "geo: latitude,longtitude";
startActivity(new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse(uri)));
Today's Waze
base url is https://waze.com/ul
so to navigate you have to use
https://waze.com/ul?ll=45.6906304,-120.810983&navigate=yes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With