Commit 0cc924a6 authored by Chris Scott's avatar Chris Scott

Define fetchCallbackId as @property instead of private variable

parent 54cee002
......@@ -9,6 +9,9 @@
#import <AudioToolbox/AudioToolbox.h>
@interface CDVBackgroundGeoLocation : CDVPlugin <CLLocationManagerDelegate>
@property (nonatomic, strong) NSString* syncCallbackId;
- (void) configure:(CDVInvokedUrlCommand*)command;
- (void) start:(CDVInvokedUrlCommand*)command;
- (void) stop:(CDVInvokedUrlCommand*)command;
......
......@@ -21,7 +21,6 @@
BOOL enabled;
NSString *token;
NSString *url;
NSString *syncCallbackId;
UIBackgroundTaskIdentifier bgTask;
NSTimer *backgroundTimer;
......@@ -95,7 +94,7 @@
isDebugging = [[command.arguments objectAtIndex: 7] boolValue];
activityType = [self decodeActivityType:[command.arguments objectAtIndex:9]];
syncCallbackId = command.callbackId;
self.syncCallbackId = command.callbackId;
locationManager.activityType = activityType;
locationManager.pausesLocationUpdatesAutomatically = YES;
......@@ -427,7 +426,7 @@
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:returnInfo];
[result setKeepCallbackAsBool:YES];
[self.commandDelegate sendPluginResult:result callbackId:syncCallbackId];
[self.commandDelegate sendPluginResult:result callbackId:self.syncCallbackId];
}
- (void) stopBackgroundTask
......@@ -496,12 +495,6 @@
}
if (isMoving) {
isAcquiringSpeed = YES;
locationAcquisitionAttempts = 0;
locationManager.distanceFilter = distanceFilter;
// Power-up the GPS temporarily until we get a good speed sample.
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
} else {
isAcquiringStationaryLocation = 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