1

I am using GPS to actually monitor if I have entered a regions (radius 100 m).

I am using a hybrid of significantLocationChanges and hardware GPS, startUpdatingLocation.

As significantLocationChanges are not as accurate as I require I am using them only to check if I have entered a outer circle of X m. Then I use hardware GPS to check if the user enters an inner circle (100m).

The problem with it is that battery is getting drained pretty quickly, can anyone help me out.

Richard Stelling
  • 25,607
  • 27
  • 108
  • 188
Mann
  • 2,118
  • 1
  • 18
  • 18
  • 1
    Make it adaptive - if there is no movement then you could check the location less frequently ? – Paul R Oct 04 '11 at 10:13
  • but even if I check location less frequently.. then also it will drain battery..also plz explain what you actually mean by less frequently.. I guess there are no time based location events in iphone... – Mann Oct 05 '11 at 06:21
  • The GPS itself drains battery greatly and I'm not sure something can be done here. So the most obvious is reduce as much as possible the time when GPS is enabled - for example, use accelerometer to detect movement and shut down GPS when there is no movement for some time. I'm struggling with exactly same issue and haven't tried suggestion above yet. My concerns are that GPS start also takes time so you should test in your particular case if there will be any benefit from turning it off/on. – remizolya Nov 15 '11 at 14:12

2 Answers2

0

Here's a preview of a nice read (High Performance iOS Apps):

https://www.safaribooksonline.com/library/view/high-performance-ios/9781491910993/ch04.html

You'll see it covers battery usage in general, so search for "gps" for specifics. I use this as a reference so I don't forget any of it's tips. Enjoy the read :)

alasker
  • 309
  • 5
  • 18
0

I was concerned about the same issue and today i have made a simple test with MotionX on iPhone 4 , covering the distance of 15 km in 4 hours, with frequent audio coaching, taking photos, saving waypoints, checking the position on map and tracking the route. After 4 hours i had still 50% of battery power. Which shows that it would probably covered 8 hours route. Good enough, or?

So there must be some ways of wise GPS management, which MotionX knows (they say it proudly in their tech. description)

jhoanna
  • 1,797
  • 25
  • 25