PRIORITY_LOW_POWER vs PRIORITY_BALANCED_POWER_ACCURACY for google play service v2

自作多情 提交于 2019-12-18 12:27:40

问题


I'm wondering for the fused location, does any of the above use a combination of gps + wifi network together? what is the difference in terms of provider (does any of it uses the gps)? from what i see in the documentation the difference is only distance

I've previously worked with LocationManager and used NETWORK_PROVIDER and GPS_PROVIDER together to get a combination of those two provider.


回答1:


The new fused location providers take a slightly different approach compared to previous methods. Developers now choose how much battery power is used to calculate a location instead of which device components are used to calculate it. It uses any available combination of GPS, Wi-Fi, mobile networks, and onboard sensors to calculate the location.

The LocationRequest priority settings are now:

  • PRIORITY_NO_POWER (passively listens for location updates from other clients)
  • PRIORITY_LOW_POWER (~10km "city" accuracy)
  • PRIORITY_BALANCED_POWER_ACCURACY (~100m "block" accuracy)
  • PRIORITY_HIGH_ACCURACY (accurate as possible at the expense of battery life)

Google describes the LocationRequest class here: https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest



来源:https://stackoverflow.com/questions/18768048/priority-low-power-vs-priority-balanced-power-accuracy-for-google-play-service-v

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!