![](/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.