Reputation: 2617
This really leads off from my "brainstorm" last night here: iPhone Brainstorm - CLLocation in Background - Polling every 15 minutes
When my application is active I can stop the CLLocationManager after I get a correct reading. Then after the performSelector afterDelay I can start it again, take a reading and stop it.
If though the application is but to the background when I have a timer running it never restart the CLLocationManager. I have registered for background location updates and if I do not stop the CLLocationManager it is fine but for battery I was hoping I could keep start/stopping it.
Please advise.
Thanks James
Upvotes: 0
Views: 1167
Reputation: 69499
Read the Apple documentation on Location in background. Timmers can't be used in the background.
If you keep CLLocationManager running with the correct settings it will only call location update on major change, which is when the user moves between cell towers/wi-fi points.
Upvotes: 1
Reputation: 150755
Save the current time when the application enters the background.
When it becomes active again:
Upvotes: 2