当我在 android studio 中传递带有起点和终点的意图时,我应该返回距离、持续时间和方向
I should get back distance, duration and directions as result when i pass an intent with origin and destination in android studio
我正在开发一个 android 应用程序,在该应用程序中,在用户注册期间我将获得他的位置并且我有一个起点。
- 我正在考虑向 Google 地图发送意图并从中获取所需的结果。如何从意图结果中提取距离、持续时间和方向?
- 还有比这更好的方法吗?
您可以使用 Google Direction API. It has many options like direction, distance (walking, driving etc). See example here.
我正在开发一个 android 应用程序,在该应用程序中,在用户注册期间我将获得他的位置并且我有一个起点。
- 我正在考虑向 Google 地图发送意图并从中获取所需的结果。如何从意图结果中提取距离、持续时间和方向?
- 还有比这更好的方法吗?
您可以使用 Google Direction API. It has many options like direction, distance (walking, driving etc). See example here.