问题
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.
回答1:
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)
回答2:
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 :)
来源:https://stackoverflow.com/questions/7646170/how-to-reduce-iphone-battery-consumption-while-using-gps