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
eb0d6d80
Commit
eb0d6d80
authored
Nov 09, 2013
by
Chris Scott
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refactor'
parents
d4d7571f
51857664
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
162 additions
and
102 deletions
+162
-102
CDVBackgroundGeoLocation.h
src/ios/CDVBackgroundGeoLocation.h
+2
-8
CDVBackgroundGeoLocation.m
src/ios/CDVBackgroundGeoLocation.m
+147
-93
BackgroundGeoLocation.js
www/BackgroundGeoLocation.js
+13
-1
No files found.
src/ios/CDVBackgroundGeoLocation.h
View file @
eb0d6d80
...
@@ -12,17 +12,11 @@
...
@@ -12,17 +12,11 @@
-
(
void
)
start
:(
CDVInvokedUrlCommand
*
)
command
;
-
(
void
)
start
:(
CDVInvokedUrlCommand
*
)
command
;
-
(
void
)
stop
:(
CDVInvokedUrlCommand
*
)
command
;
-
(
void
)
stop
:(
CDVInvokedUrlCommand
*
)
command
;
-
(
void
)
test
:(
CDVInvokedUrlCommand
*
)
command
;
-
(
void
)
test
:(
CDVInvokedUrlCommand
*
)
command
;
-
(
void
)
finish
:(
CDVInvokedUrlCommand
*
)
command
;
-
(
void
)
sync
;
-
(
void
)
sync
;
-
(
void
)
onSuspend
:(
NSNotification
*
)
notification
;
-
(
void
)
onSuspend
:(
NSNotification
*
)
notification
;
-
(
void
)
onResume
:(
NSNotification
*
)
notification
;
-
(
void
)
onResume
:(
NSNotification
*
)
notification
;
@property
(
nonatomic
,
retain
)
NSString
*
token
;
@property
(
nonatomic
,
retain
)
NSString
*
url
;
@property
(
nonatomic
,
assign
)
BOOL
enabled
;
@property
(
nonatomic
,
retain
)
NSNumber
*
maxBackgroundHours
;
@property
(
nonatomic
,
strong
)
CLLocationManager
*
locationManager
;
@property
(
nonatomic
,
strong
)
CDVLocationData
*
locationData
;
@property
(
strong
)
NSMutableArray
*
locationCache
;
@property
(
nonatomic
,
retain
)
NSDate
*
suspendedAt
;
@end
@end
src/ios/CDVBackgroundGeoLocation.m
View file @
eb0d6d80
This diff is collapsed.
Click to expand it.
www/BackgroundGeoLocation.js
View file @
eb0d6d80
...
@@ -28,11 +28,15 @@ module.exports = {
...
@@ -28,11 +28,15 @@ module.exports = {
if
(
!
config
.
auth_token
||
!
config
.
url
)
{
if
(
!
config
.
auth_token
||
!
config
.
url
)
{
console
.
log
(
"
BackgroundGeoLocation requires an auth_token and url to report to the server
"
);
console
.
log
(
"
BackgroundGeoLocation requires an auth_token and url to report to the server
"
);
}
}
var
stationaryRadius
=
config
.
stationaryRadius
||
50
,
// meters
distanceFilter
=
config
.
distanceFilter
||
500
,
// meters
locationTimeout
=
config
.
locationTimeout
||
60
;
// seconds
exec
(
success
||
function
()
{},
exec
(
success
||
function
()
{},
failure
||
function
()
{},
failure
||
function
()
{},
'
BackgroundGeoLocation
'
,
'
BackgroundGeoLocation
'
,
'
configure
'
,
'
configure
'
,
[
config
.
auth_token
,
config
.
url
]);
[
config
.
auth_token
,
config
.
url
,
stationaryRadius
,
distanceFilter
,
locationTimeout
]);
},
},
start
:
function
(
success
,
failure
,
config
)
{
start
:
function
(
success
,
failure
,
config
)
{
exec
(
success
||
function
()
{},
exec
(
success
||
function
()
{},
...
@@ -54,6 +58,14 @@ module.exports = {
...
@@ -54,6 +58,14 @@ module.exports = {
'
BackgroundGeoLocation
'
,
'
BackgroundGeoLocation
'
,
'
test
'
,
'
test
'
,
[]);
[]);
},
finish
:
function
(
success
,
failure
)
{
exec
(
success
||
function
()
{},
failure
||
function
()
{},
'
BackgroundGeoLocation
'
,
'
finish
'
,
[]);
}
}
};
};
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