Commit 4700a022 authored by Chris Scott's avatar Chris Scott

Update docs with new API

parent 8e0936c5
BackgroundGeoLocation BackgroundGeoLocation
============================== ==============================
Cross-platform background geolocation for Cordova / PhoneGap. Cross-platform background geolocation for Cordova / PhoneGap with battery-saving "circular region monitoring" and "stop detection".
Follows the [Cordova Plugin spec](https://github.com/apache/cordova-plugman/blob/master/plugin_spec.md), so that it works with [Plugman](https://github.com/apache/cordova-plugman). Follows the [Cordova Plugin spec](https://github.com/apache/cordova-plugman/blob/master/plugin_spec.md), so that it works with [Plugman](https://github.com/apache/cordova-plugman).
...@@ -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
``` ```
phonegap plugin add https://github.com/christocracy/cordova-plugin-background-geolocation.git cordova plugin add https://github.com/christocracy/cordova-plugin-background-geolocation.git
``` ```
A full example could be: A full example could be:
...@@ -70,7 +70,10 @@ A full example could be: ...@@ -70,7 +70,10 @@ 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', // <-- only required for Android; ios allows javascript callbacks for your http url: 'http://only.for.android.com/update_location.json', // <-- only required for Android; ios allows javascript callbacks for your http
authToken: 'user_secret_auth_token', // <-- only required for Android; ios allows javascript callbacks for your http params: { // HTTP POST params sent to your server when persisting locations.
auth_token: 'user_secret_auth_token'
foo: 'bar'
},
desiredAccuracy: 10, desiredAccuracy: 10,
stationaryRadius: 20, stationaryRadius: 20,
distanceFilter: 30, distanceFilter: 30,
...@@ -98,7 +101,7 @@ When the plugin detects your user has moved beyond his stationary-region, it eng ...@@ -98,7 +101,7 @@ When the plugin detects your user has moved beyond his stationary-region, it eng
## iOS and Android ## iOS and Android
The plugin works best with iOS but Android is currently under heavy development and coming along well with features being ported from iOS. Those are the only two supported platforms but I foresee a Windows Phone version once I get a client who desires that. The plugin works with iOS and Android
### Config ### Config
...@@ -160,7 +163,6 @@ Compare now background-geolocation in the scope of a city. In this image, the l ...@@ -160,7 +163,6 @@ Compare now background-geolocation in the scope of a city. In this image, the l
![distanceFilter at city scale](/distance-filter-city.png "distanceFilter at city scale") ![distanceFilter at city scale](/distance-filter-city.png "distanceFilter at city scale")
## Licence ## ## Licence ##
The MIT License The MIT License
......
...@@ -91,7 +91,10 @@ var app = { ...@@ -91,7 +91,10 @@ var app = {
// 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', // <-- only required for Android; ios allows javascript callbacks for your http url: 'http://only.for.android.com/update_location.json', // <-- only required for Android; ios allows javascript callbacks for your http
authToken: 'user_secret_auth_token', // <-- only required for Android; ios allows javascript callbacks for your http params: { // HTTP POST params sent to your server when persisting locations.
auth_token: 'user_secret_auth_token'
foo: 'bar'
},
desiredAccuracy: 10, desiredAccuracy: 10,
stationaryRadius: 20, stationaryRadius: 20,
distanceFilter: 30, distanceFilter: 30,
......
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