Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cordova-plugin-background-geolocation
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Aksimaya
cordova-plugin-background-geolocation
Commits
0cc924a6
Commit
0cc924a6
authored
Jul 31, 2014
by
Chris Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define fetchCallbackId as @property instead of private variable
parent
54cee002
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
17 deletions
+13
-17
CDVBackgroundGeoLocation.h
src/ios/CDVBackgroundGeoLocation.h
+3
-0
CDVBackgroundGeoLocation.m
src/ios/CDVBackgroundGeoLocation.m
+10
-17
No files found.
src/ios/CDVBackgroundGeoLocation.h
View file @
0cc924a6
...
...
@@ -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
;
...
...
src/ios/CDVBackgroundGeoLocation.m
View file @
0cc924a6
...
...
@@ -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
;
s
elf
.
s
yncCallbackId
=
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
:
s
elf
.
s
yncCallbackId
];
}
-
(
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment