diff --git a/src/plugins/background-geolocation.ts b/src/plugins/background-geolocation.ts index 96525634c..dc452efd2 100644 --- a/src/plugins/background-geolocation.ts +++ b/src/plugins/background-geolocation.ts @@ -180,18 +180,19 @@ export interface Config { * 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'); - * }); + * BackgroundGeolocation.configure((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 + + * }, (error) => { + * console.log('BackgroundGeolocation error'); + * }, { + * //options + * }); * * // Turn ON the background-geolocation system. The user will be tracked whenever they suspend the app. * BackgroundGeolocation.start();