我正在创建一个应用程序,它需要打开谷歌地图以导航到步行模式的地方并将源/从位置设置为当前位置。
这是我使用的代码。
String url = "https://maps.google.co.in/maps?q=" + destination + "&mode=walking";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(intent);
如何将“从位置”设置为“当前位置”?谢谢。