【发布时间】:2014-07-27 17:25:17
【问题描述】:
您好,我正在使用以下代码显示用户当前位置和汽车位置之间的方向。
String uri = String.format(Locale.ENGLISH, "http://maps.google.com/maps?saddr=%f,%f(%s)&daddr=%f,%f (%s)", curLat, curLong, "Your location", carLat, carLong, "Your vehicle location");
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
这很好,但我需要在进入导航活动之前按下开始导航。我想要的是我需要直接进入导航活动而不按开始导航按钮。
如下所示。左边的图像是我首先得到的。单击底部的开始导航按钮后,我会被带到轮流导航(右图)。是否可以直接转到默认android应用程序的轮流导航?。
【问题讨论】:
标签: android gps geolocation android-location android-navigation