【发布时间】:2017-08-20 13:17:55
【问题描述】:
我需要准确的位置更新。当使用来自 GooglePlayServices 的 FusedLocationServices 时,即使我设置了 HighAccuracy,它也会在 GPS 不可用时从 Wi-Fi 和蜂窝网络获取位置。如何仅通过 GPS 请求位置,并且在 GPS 不可用时没有更新?
【问题讨论】:
标签: android android-location android-gps
我需要准确的位置更新。当使用来自 GooglePlayServices 的 FusedLocationServices 时,即使我设置了 HighAccuracy,它也会在 GPS 不可用时从 Wi-Fi 和蜂窝网络获取位置。如何仅通过 GPS 请求位置,并且在 GPS 不可用时没有更新?
【问题讨论】:
标签: android android-location android-gps
使用LocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, ...)
这完全消除了对 GooglePlayServices.Location 的需求。
【讨论】: