0
我使用以下代碼打開從當前位置到Google地圖中特定位置的方向。直接在Google地圖中打開方向
但代碼首先顯示我「打開對話框」,讓用戶選擇打開其他組件也。我希望用戶直接轉到Google地圖,而不讓他選擇選擇。我怎樣才能做到這一點?
String uri = "https://maps.google.com/maps?f=d&daddr="+location;
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(i);
如果用戶沒有Google地圖應用...? –
@MarkChorley我認爲所有的Android手機默認都有谷歌地圖應用程序? –