Merge pull request #199 from vfdev-5/master

Fix documentation problem in BackgroundGeolocation plugin
This commit is contained in:
Ibrahim Hadeed 2016-06-09 02:50:00 -04:00
commit 3d5762de86

View File

@ -170,26 +170,26 @@ export interface Config {
* platform.ready().then(() => { * platform.ready().then(() => {
* *
* // BackgroundGeolocation is highly configurable. See platform specific configuration options * // BackgroundGeolocation is highly configurable. See platform specific configuration options
* BackgroundGeolocation.configure( * let config = {
* (location) => {
* console.log('[js] BackgroundGeolocation callback: ' + location.latitude + ',' + location.longitude);
*
* // IMPORTANT: You must execute the finish method here to inform the native plugin that you're finished,
* // and the background-task may be completed. You must do this regardless if your HTTP request is successful or not.
* // IF YOU DON'T, ios will CRASH YOUR APP for spending too much time in the background.
* BackgroundGeolocation.finish();
* },
* (error) => {
* console.log('BackgroundGeolocation error');
* },
* {
* desiredAccuracy: 10, * desiredAccuracy: 10,
* stationaryRadius: 20, * stationaryRadius: 20,
* distanceFilter: 30, * distanceFilter: 30,
* debug: true, // enable this hear sounds for background-geolocation life-cycle. * debug: true, // enable this hear sounds for background-geolocation life-cycle.
* stopOnTerminate: false, // enable this to clear background location settings when the app terminates * stopOnTerminate: false, // enable this to clear background location settings when the app terminates
* } * };
* ); *
* BackgroundGeolocation.configure(config)
* .then((location) => {
* console.log('[js] BackgroundGeolocation callback: ' + location.latitude + ',' + location.longitude);
*
* // IMPORTANT: You must execute the finish method here to inform the native plugin that you're finished,
* // and the background-task may be completed. You must do this regardless if your HTTP request is successful or not.
* // IF YOU DON'T, ios will CRASH YOUR APP for spending too much time in the background.
* BackgroundGeolocation.finish(); // FOR IOS ONLY
* })
* .catch((error) => {
* console.log('BackgroundGeolocation error');
* });
* *
* // 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.
* BackgroundGeolocation.start(); * BackgroundGeolocation.start();