Android 是否可以在导航器上显示两个coords之间启动googlemaps的路线?(按程序)

Android 是否可以在导航器上显示两个coords之间启动googlemaps的路线?(按程序),android,google-maps,Android,Google Maps,我知道我可以做到这一点: 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"));

我知道我可以做到这一点:

            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);
但是我需要删除对话框,并将其设置为启动navigator?如何操作

我知道我可以使用
intent.setClassName(“com.google.android.apps.maps”,“com.google.android.maps.MapsActivity”)打开googlemap应用程序的对话框

但我需要的恰恰相反,启动导航器。

试试看

Intent i = new Intent();

i.setComponent(new ComponentName("com.android.browser", "com.android.browser.BrowserActivity"));
i.setAction("android.intent.action.VIEW");
i.addCategory("android.intent.category.BROWSABLE");
Uri data = Uri.parse("http://www.google.com");
i.setData(data);

startSubActivity(i, 2); 
试一试


ActivityNotFoundException:找不到显式活动类{com.google.android.browser/com.google.android.browser.browser.BrowserActivity};您是否在AndroidManifest.xml中声明了此活动?ContentURI也不存在另外两个错误:“comp无法解析为变量”和“类型new View.OnClickListener(){}的方法startSubActivity(Intent,int)未定义”好的,我解决了这两个错误,现在可以工作了!它会打开导航器!但是它用XT显示路线,我需要在地图上显示路线,怎么做?ActivityNotFoundException:找不到显式活动类{com.google.android.browser/com.google.android.browser.browser.BrowserActivity};您是否在AndroidManifest.xml中声明了此活动?ContentURI也不存在另外两个错误:“comp无法解析为变量”和“类型new View.OnClickListener(){}的方法startSubActivity(Intent,int)未定义”好的,我解决了这两个错误,现在可以工作了!它会打开导航器!但是它用XT显示路线,我需要在地图上显示路线,怎么做?