How to reduce iPhone battery consumption while using GPS

孤街浪徒 提交于 2019-12-23 02:47:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!