mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-20 01:22:52 +08:00
Merge pull request #199 from vfdev-5/master
Fix documentation problem in BackgroundGeolocation plugin
This commit is contained in:
commit
3d5762de86
@ -170,26 +170,26 @@ export interface Config {
|
||||
* platform.ready().then(() => {
|
||||
*
|
||||
* // BackgroundGeolocation is highly configurable. See platform specific configuration options
|
||||
* 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();
|
||||
* },
|
||||
* (error) => {
|
||||
* console.log('BackgroundGeolocation error');
|
||||
* },
|
||||
* {
|
||||
* let config = {
|
||||
* desiredAccuracy: 10,
|
||||
* stationaryRadius: 20,
|
||||
* distanceFilter: 30,
|
||||
* debug: true, // enable this hear sounds for background-geolocation life-cycle.
|
||||
* 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.
|
||||
* BackgroundGeolocation.start();
|
||||
|
Loading…
Reference in New Issue
Block a user