Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PRIORITY_LOW_POWER vs PRIORITY_BALANCED_POWER_ACCURACY for google play service v2

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.

like image 908
ericlee Avatar asked Sep 12 '13 15:09

ericlee


People also ask

What is the difference between priority_low_power and priority_no_power?

Typically uses a combination of Wi-Fi and cell information to compute device location. PRIORITY_LOW_POWER largely relies on cell towers and avoids GPS and Wi-Fi inputs, providing coarse (city-level) accuracy with minimal battery drain. PRIORITY_NO_POWER receives locations passively from other apps for which location has already been computed.

How does priority_balanced_power_accuracy work?

PRIORITY_BALANCED_POWER_ACCURACY provides accurate location while optimizing for power. Very rarely uses GPS. Typically uses a combination of Wi-Fi and cell information to compute device location.

How to request the best location accuracy possible with zero power consumption?

Used with setPriority(int) to request the best accuracy possible with zero additional power consumption. No locations will be returned unless a different client has requested location updates in which case this request will act as a passive listener to those locations.

What does the priority_high_accuracy option do?

the smallest displacement in meters the user must move between location updates. Sets whether the client wants the locations services to wait a few seconds for accurate locations initially, when accurate locations could not be computed on the device immediately after PRIORITY_HIGH_ACCURACY request is made.


1 Answers

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

like image 106
mike47 Avatar answered Oct 26 '22 05:10

mike47