Commit f6e518fe authored by Chris Scott's avatar Chris Scott

If app is in background, execute setPace immediately in order to apply updated config

parent 84292743
...@@ -98,7 +98,12 @@ ...@@ -98,7 +98,12 @@
locationTimeout = [config[@"timeout"] intValue]; locationTimeout = [config[@"timeout"] intValue];
NSLog(@" locationTimeout: %@", config[@"timeout"]); NSLog(@" locationTimeout: %@", config[@"timeout"]);
} }
UIApplicationState state = [[UIApplication sharedApplication] applicationState];
if (enabled && state == UIApplicationStateBackground) {
[self setPace:isMoving];
}
CDVPluginResult* result = nil; CDVPluginResult* result = nil;
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
[self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
......
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