Commit 5b169c2a authored by Chris Scott's avatar Chris Scott

Update README.md

parent 0f54e265
...@@ -152,6 +152,16 @@ Keep in mind that it is **not** possible to use ```start()``` at the ```pause``` ...@@ -152,6 +152,16 @@ Keep in mind that it is **not** possible to use ```start()``` at the ```pause```
Configures the plugin's parameters (@see following [Config](https://github.com/christocracy/cordova-background-geolocation/blob/edge/README.md#config) section for accepted ```config``` params. The ```locationCallback``` will be executed each time a new Geolocation is recorded. Configures the plugin's parameters (@see following [Config](https://github.com/christocracy/cordova-background-geolocation/blob/edge/README.md#config) section for accepted ```config``` params. The ```locationCallback``` will be executed each time a new Geolocation is recorded.
#####`setConfig(successFn, failureFn, config)`
Reconfigure plugin's configuration (@see followign ##Config## section for accepted ```config``` params. **NOTE** The plugin will continue to send recorded Geolocation to the ```locationCallback``` you provided to ```configure``` method -- use this method only to change configuration params (eg: ```distanceFilter```, ```stationaryRadius```, etc).
```
bgGeo.setConfig(function(){}, function(){}, {
desiredAccuracy: 10,
distanceFilter: 100
});
```
#####`start(successFn, failureFn)` #####`start(successFn, failureFn)`
Enable background geolocation tracking. Enable background geolocation tracking.
...@@ -176,16 +186,6 @@ bgGeo.changePace(true); // <-- Aggressive GPS monitoring immediately engaged. ...@@ -176,16 +186,6 @@ bgGeo.changePace(true); // <-- Aggressive GPS monitoring immediately engaged.
bgGeo.changePace(false); // <-- Disable aggressive GPS monitoring. Engages stationary-mode. bgGeo.changePace(false); // <-- Disable aggressive GPS monitoring. Engages stationary-mode.
``` ```
#####`setConfig(successFn, failureFn, config)`
Reconfigure plugin's configuration (@see followign ##Config## section for accepted ```config``` params.
```
bgGeo.setConfig(function(){}, function(){}, {
desiredAccuracy: 10,
distanceFilter: 100
});
```
#####`onStationary(callbackFn, failureFn)` #####`onStationary(callbackFn, failureFn)`
Your ```callbackFn``` will be executed each time the device has entered stationary-monitoring mode. The ```callbackFn``` will be provided with a ```Geolocation``` object as the 1st param, with the usual params (```latitude, longitude, accuracy, speed, bearing, altitude```). Your ```callbackFn``` will be executed each time the device has entered stationary-monitoring mode. The ```callbackFn``` will be provided with a ```Geolocation``` object as the 1st param, with the usual params (```latitude, longitude, accuracy, speed, bearing, altitude```).
......
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