简体   繁体   English

导航Android和Google地图

[英]Navigation Android and Google Maps

I am using google navigation in my app. 我在我的应用程序中使用Google导航。

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=53.3,21.7"));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

Is any way to open this navigation in my app with custom settings? 是否可以通过自定义设置在我的应用中打开此导航?

Try this: 尝试这个:

float lat = 53.3f; 浮点数= 53.3f; float lng = 21.7f; 浮动lng = 21.7f;

String maplLabel = "ABC Label";
final Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
        Uri.parse("geo:0,0?q="+lat+","+lng+"&z=16 (" + maplLabel + ")"));
startActivity(intent);

In this way, you open the external App maps. 通过这种方式,您可以打开外部应用程序地图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM