Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cordova-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-background-geolocation
Commits
181bdfdb
Commit
181bdfdb
authored
Feb 22, 2015
by
Chris Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs
parent
c62d73bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
README.md
README.md
+16
-19
No files found.
README.md
View file @
181bdfdb
...
@@ -20,7 +20,7 @@ The plugin creates the object `window.plugins.backgroundGeoLocation` with the me
...
@@ -20,7 +20,7 @@ The plugin creates the object `window.plugins.backgroundGeoLocation` with the me
```
```
cordova plugin add https://github.com/christocracy/cordova-
plugin-
background-geolocation.git
cordova plugin add https://github.com/christocracy/cordova-background-geolocation.git
```
```
A full example could be:
A full example could be:
...
@@ -69,22 +69,14 @@ A full example could be:
...
@@ -69,22 +69,14 @@ A full example could be:
// BackgroundGeoLocation is highly configurable.
// BackgroundGeoLocation is highly configurable.
bgGeo.configure(callbackFn, failureFn, {
bgGeo.configure(callbackFn, failureFn, {
url: 'http://only.for.android.com/update_location.json', // <-- Android ONLY: your server url to send locations to
desiredAccuracy: 0, // <-- 0: highest power, highest accuracy; 1000: lowest power, lowest accuracy.
params: {
stationaryRadius: 50,
auth_token: 'user_secret_auth_token', // <-- Android ONLY: HTTP POST params sent to your server when persisting locations.
distanceFilter: 50, // <-- minimum distance between location events
foo: 'bar' // <-- Android ONLY: HTTP POST params sent to your server when persisting locations.
activityType: 'AutomotiveNavigation', // <-- [ios]
},
locationUpdateInterval: 30000, // <-- [android] minimum time between location updates, used in conjunction with #distanceFilter
headers: { // <-- Android ONLY: Optional HTTP headers sent to your configured #url when persisting locations
activityRecognitionInterval: 10000, // <-- [android] sampling-rate activity-recognition system for movement/stationary detection
"X-Foo": "BAR"
debug: true, // <-- enable this hear sounds, see notifications during life-cycle events.
},
stopOnTerminate: false // <-- enable this to clear background location settings when the app terminates
desiredAccuracy: 10,
stationaryRadius: 20,
distanceFilter: 30,
notificationTitle: 'Background tracking', // <-- android only, customize the title of the notification
notificationText: 'ENABLED', // <-- android only, customize the text of the notification
activityType: 'AutomotiveNavigation',
debug: true, // <-- enable this hear sounds for background-geolocation life-cycle.
stopOnTerminate: false // <-- enable this to clear background location settings when the app terminates
});
});
// Turn ON the background-geolocation system. The user will be tracked whenever they suspend the app.
// Turn ON the background-geolocation system. The user will be tracked whenever they suspend the app.
...
@@ -103,10 +95,15 @@ NOTE: The plugin includes `org.apache.cordova.geolocation` as a dependency. You
...
@@ -103,10 +95,15 @@ NOTE: The plugin includes `org.apache.cordova.geolocation` as a dependency. You
This plugin hosts a SampleApp in
```example/SampleApp```
folder. This SampleApp contains no plugins so you must first start by adding this plugin
This plugin hosts a SampleApp in
```example/SampleApp```
folder. This SampleApp contains no plugins so you must first start by adding this plugin
```
```
$ cd example/SampleApp
$ git clone git@github.com:christocracy/cordova-background-geolocation.git
$ cordova plugin add https://github.com/christocracy/cordova-plugin-background-geolocation.git
$ mkdir tmp
$ cp -R cordova-background-geolocation/example/SampleApp tmp
$ cd tmp/SampleApp
$ cordova plugin add git@github.com:christocracy/cordova-background-geolocation.git
$ cordova platform add ios
$ cordova platform add ios
$ cordova platform add android
$ cordova build ios
$ cordova build ios
$ cordova build android
```
```
...
...
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