1
我知道,我可以用這個做到這一點:可以在導航器上顯示啓動Google地圖的兩個座標之間的路線嗎? (編程)
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?saddr=39.45798340851973,-0.3835865820296931&daddr=39.44353524837272,-0.3760334814437556"));
startActivity(intent);
但我需要刪除的對話框,並forze它推出領航¿怎麼辦呢?
我知道我可以forze對話與intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
打開GoogleMap的應用程序,但我需要的正好相反,啓動導航。
ActivityNotFoundException:無法找到明確的活動類{com.google.android.browser/com.google.android.browser.BrowserActivity};你有沒有在你的AndroidManifest.xml中聲明這個活動? – NullPointerException
也ContentURI不存在 – NullPointerException
哎呀,試試我的更新版本 – Michele