Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem launching Google Navigation

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 ?

like image 984
Pachanka Avatar asked Sep 12 '10 18:09

Pachanka


3 Answers

Google Navigation does not have any documented and supported Intent filters. It is not designed to be integrated from third party apps.

like image 81
CommonsWare Avatar answered Nov 10 '22 16:11

CommonsWare


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);
like image 29
Bud Avatar answered Nov 10 '22 15:11

Bud


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.

like image 1
mtmurdock Avatar answered Nov 10 '22 14:11

mtmurdock