![](/img/trans.png)
[英]How do I replace my android app Google maps radius circle with a blue translucent one as in image?
[英]How do i link my android app to another built in application like google maps?
我想知道我是否可以将我的应用程序与诸如Google Maps之类的应用程序链接? 例如,如果我创建一个按钮并单击onClick
,则转到Google Maps应用程序,那么我可以将按钮的onClick
事件直接定向到地图吗?
您可以有意图地执行此操作,如果您想从应用程序中打开Google地图,则可以使用以下代码进行操作:
String uri = "geo:"+ latitude + "," + longitude;
Intent myMapIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(myMapIntent);
您可以在相关的Android文档中找到一些有用的信息
您可以使用
geo:latitude,longitude
geo:latitude,longitude?z=zoom
geo:0,0?q=my+street+address
geo:0,0?q=business+near+city
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?saddr="+mylocation));
startActivity(intent);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.