3

I have a Service that uses the LocationListener, and it will be running from boot, indefinitely. My question is, how often is too often to listen for location updates? Is 5 minutes a battery killer? What about 1?

zkwentz
  • 1,095
  • 5
  • 22
  • 44

2 Answers2

2

Yes, 5 minutes is a battery killer. I wouldn't use an interval smaller than 1 hour. It also depends on the location provider (network or GPS). GPS eats your battery much faster thank network.

Edi
  • 820
  • 9
  • 13
  • Thanks Edi. And out of interest, how reliable would you say the GPS functionality is? At this point I can't use it anyway, but I've been testing an app and sometimes it won't update GPS at all. Is this expected that sometimes it just won't be able to communicate with satellites, for whatever reason? – zkwentz Oct 05 '10 at 17:23
  • You're welcome. GPS does not work indoors and some locations don't have satellites coverage (or they have weak coverage, so it takes time for the phone to get the location). – Edi Oct 06 '10 at 10:46
0

Depending on your usecase you might also want to consider the http://developer.android.com/reference/android/location/LocationManager.html#PASSIVE_PROVIDER that won't request updates on its own, but only receives location when other apps request them..

Otherwise I would make it configurable for the user how often new locations should be accquired and if to use GPS or network (network is faster, cheaper, but returns way more inaccurate locations).

icyerasor
  • 4,973
  • 1
  • 43
  • 52