I need to track the user's location in the background at a specific time. Can the background task be started at e.g 7pm-11pm?
The only way I have been able to acheive this so far is to have the background task continually running and this seems a bad approach as it considerably drains battery.
I have set the accuracy and distance filter of the CLLocation manager to conserve battery outside of these times:
[locationManager setDesiredAccuracy:kCLLocationAccuracyThreeKilometers];
[locationManager setDistanceFilter:2000.0f];
I then change this between 7-11pm back to:
[locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
[locationManager setDistanceFilter:10.0f];
I have turned off locationManager.pausesLocationUpdatesAutomatically
as this seems to kill the background task when the user stays still for 15-20mins - it doesn't resume when the user moves again.
Is there a better way to minimise battery drain outside of these times.
Also, am I correct in thinking that startMonitoringSignificantLocationChanges only does a location update when you move over 500m - if this is the case it would not be accurate enough during 7-11pm.
Any ideas?