在 android 中有两个单独的函数来获取位置:
- 获取上一个位置()
- 获取当前位置()
getLastLocation 返回设备的最后一个已知位置,getCurrentLocation 通过查找最新(当前)位置返回设备的当前位置。getCurrentLocation 需要一些时间来计算 getLastLocation 不需要任何时间的位置。
在Huawei Location Kit中,我找到了location和getLastLocation()的fusedLocation回调。有什么方法可以像在android中那样获取当前位置。获得设备确切位置的最佳方法是什么?