mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
chore(backgroundGeolocation): update usage
This commit is contained in:
parent
4e206812f0
commit
09e6fc9738
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user