i tried since many hours to launch navigation from my app. I want navigation without destination.
i tried with
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q="));
startActivity(i);
That launches navigation but with destination not found
I tried too to launch processName, packageName with startIntent with com.google.android.apps.maps, com.google.android.apps.maps:driveabout and **com.google.android.maps.driveabout.app.DestinationActivity
with no succes too :/
an idea ?
Google Navigation does not have any documented and supported Intent
filters. It is not designed to be integrated from third party apps.
The following code should work...
String url = "google.navigation:q="+startPos.getLatitude()+","+startPos.getLongitude();
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(i);
Take a closer look a the intent filter for Google Navigation. It could be that it is not designed to be started via Intent without a specified destination. Unfortunately, i don't know where to find information about Google Navigation's intent filter, but if you were to show me where you are looking i could help you figure it out.
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