开发者

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 to开发者_JAVA技巧o 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.


Try using

google.navigation:fd=true


i don't want to integrate it, i just want to launch it like a click on the list of apps whith a home launcher.

I've tried the google home sample, and navigation can be launched. but i don't understand why that doesn't work with my own app :/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜