开发者

iOS : Region monitoring and battery usage

I would like to use region monitoring in iOS , for location based alerts/calculations.

I'm worried that it would drain the battery. I searched for it on the iOS reference , and couldn't find any evidence for it.

Is that service available at all times , regardless of the region monitoring (i.e. scanned every minute or so...) or should I use the "significant location change" API instead ?

update : so , battery usage isn't dramatic. Its pretty good actually. would开发者_高级运维 like to receive some advice regarding switching between the modes (region/standard).


After checking for almost 2 weeks , I can tell that region monitoring does not significantly drain the battery.
As a matter of fact , it will be an active service in iOS 5 for sure , as the built-in reminders app will use region monitoring 24/7.


Region monitoring shouldn't have anywhere near the same affect on battery life as location tracking does.

According to Apple's developer documentation, region monitoring is built upon CoreLocation's "significant-change" location service. In order to conserve battery life, this service does not poll position information using aGPS, but instead simply tracks changes in the user's current cell tower.

Whenever the cell tower changes, iOS calculates whether any region boundaries were crossed. If a region crossing occurs while an iOS app is not running, iOS automatically wakes it up (or relaunches it) in the background so that it can process the event via the didEnterRegion:/didExitRegion: callbacks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜