1

Hello everyone I have a question an which I did not find answer.Do someone know how some big applications (e.g Facebook) have resolved problems between accuracy of location and battery power? Do they use Fused Location Provider with High-accuracy or what?

1 Answers1

0

The fused location api provides more than a simple battery/performance improvement. It basically decides on your behalf what sensors to use to determine the location depending on the precision that you need and what's available.

As for how to achieve the best battery/performance balance:

Short Answer:

The battery/performance issue is dealt with by sacrificing as much precision as possible without hurting the user experience. This is done by switching between different precision modes depending on the situation.

Example use cases (just to give an idea for how to think about it):

  • If you need to tag a picture with a location, get the coordinates using with high precision. If you do the math, the gps battery consumption will be negligible in comparison to both the camera and screen on, and this situation won't last for long so a high power draw is not an issue if it's only for a few seconds.
  • If you need to check when a user gets to a certain location, you'd check for the location with a balanced mode every 15min. It's not as precise, and not exactly real time, but it won't consume a lot of battery and won't impact the user experience since it will detect the general area where the user is whenever he stays at the same location long enough so that he cares about the info.
  • If you need to know that the user is in a precise location, first check with low battery consumption methods, if he's in the general area, then check again with high precision. This will reduce the battery consumption significantly.
  • Turn off location detection completely at times when the user will probably not need it. For example if it's a business application, we surely don't need it during the weekend, so just don't check for the location at that time.
Ali Al Amine
  • 161
  • 2
  • 4