Commit 2952b510 authored by Chris Scott's avatar Chris Scott

If BackgroundGEoLOcation is started while already in backgroudn, execute...

If BackgroundGEoLOcation is started while already in backgroudn, execute setPace immediately in order to initiate region-monitoring
parent b960cf07
......@@ -82,6 +82,11 @@
{
NSLog(@"CDVBackgroundGeoLocation start");
enabled = YES;
UIApplicationState state = [[UIApplication sharedApplication] applicationState];
if (state == UIApplicationStateBackground) {
[self setPace:NO];
}
}
/**
* Turn it off
......@@ -243,6 +248,8 @@
*/
- (void)setPace:(BOOL)value
{
NSLog(@"- CDVBackgroundGeoLocation setPace %d", value);
if (myRegion != nil) {
[locationManager stopMonitoringForRegion:myRegion];
myRegion = nil;
......
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