Commit 16309141 authored by Chris Scott's avatar Chris Scott

Always ON significant-changes seems to keep app running in bg

parent f39d5b14
......@@ -163,6 +163,7 @@
NSLog(@"- CDVBackgroundGeoLocation start (background? %d)", state);
[locationManager startMonitoringSignificantLocationChanges];
if (state == UIApplicationStateBackground) {
[self setPace:isMoving];
}
......@@ -259,7 +260,6 @@
{
NSLog(@"- CDVBackgroundGeoLocation resume");
if (enabled) {
[locationManager stopMonitoringSignificantLocationChanges];
[locationManager stopUpdatingLocation];
}
}
......@@ -477,7 +477,6 @@
isAcquiringSpeed = YES;
speedAcquisitionAttempts = 0;
[locationManager stopMonitoringSignificantLocationChanges];
locationManager.distanceFilter = distanceFilter;
// Power-up the GPS temporarily until we get a good speed sample.
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
......@@ -509,7 +508,6 @@
[locationManager stopUpdatingLocation];
locationManager.distanceFilter = distanceFilter;
locationManager.desiredAccuracy = desiredAccuracy;
[locationManager startMonitoringSignificantLocationChanges];
stationaryRegion = [[CLCircularRegion alloc] initWithCenter: coord radius:stationaryRadius identifier:@"BackgroundGeoLocation stationary region"];
stationaryRegion.notifyOnExit = YES;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment