Reputation: 3583
When getting GPS location on a fixed interval (say per hour), does this drain the battery every hour, every minute or only when either actually getting the location each hour or updating the location. I'm eager to know what goes on in the background.
Here is what this reference says
"Background services should be careful about setting a sufficiently high minTime so that the device doesn't consume too much power by keeping the GPS or wireless radios on all the time. In particular, values under 60000ms are not recommended. "
So I'm hoping that when the location is changed, or after minTime, the GPS radios are on, and after getting location, the GPS radios are off
Can anyone confirm this to be true?
Upvotes: 3
Views: 3241
Reputation: 189
Battery consumed is at its peak at the time when location manager tries to pinpoint your location(you can observe GPS icon blinking on status bar at that time) and this happens once in an hour in your case.. So GPS is automatically turned to "not available" state once you get a location until your next hour is reached..
And the line "In particular, values under 60000ms are not recommended" is said because it takes some time for GPS to point out your location, typically a minute maybe depending on your satellite strength.. So if your minTime is set to less than a minute(60000ms) its like your GPS is almost on for all the time..
Upvotes: 1
Reputation: 1788
According to reference we can decide that expensive battery using happens when GPS engine try to get new location and we can control freqency of this using method public void requestLocationUpdates (long minTime, float minDistance, Criteria criteria, PendingIntent intent)
Upvotes: 1