docs(background-geolocation): update usage doc (#2924)
docs(background-geolocation): update usage doc
This commit is contained in:
commit
eeb68f1706
@ -514,14 +514,16 @@ export declare enum BackgroundGeolocationIOSActivity {
|
|||||||
* };
|
* };
|
||||||
*
|
*
|
||||||
* this.backgroundGeolocation.configure(config)
|
* this.backgroundGeolocation.configure(config)
|
||||||
* .subscribe((location: BackgroundGeolocationResponse) => {
|
* .then(() => {
|
||||||
*
|
*
|
||||||
* console.log(location);
|
* this.backgroundGeolocation.on('location').subscribe((location: BackgroundGeolocationResponse) => {
|
||||||
|
* console.log(location);
|
||||||
*
|
*
|
||||||
* // IMPORTANT: You must execute the finish method here to inform the native plugin that you're finished,
|
* // 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.
|
* // and the background-task may be completed. You must do this regardless if your operations are successful or not.
|
||||||
* // IF YOU DON'T, ios will CRASH YOUR APP for spending too much time in the background.
|
* // IF YOU DON'T, ios will CRASH YOUR APP for spending too much time in the background.
|
||||||
* this.backgroundGeolocation.finish(); // FOR IOS ONLY
|
* this.backgroundGeolocation.finish(); // FOR IOS ONLY
|
||||||
|
* });
|
||||||
*
|
*
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
@ -549,7 +551,7 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
|||||||
* Configure the plugin.
|
* Configure the plugin.
|
||||||
*
|
*
|
||||||
* @param options {BackgroundGeolocationConfig} options An object of type Config
|
* @param options {BackgroundGeolocationConfig} options An object of type Config
|
||||||
* @return {Observable<BackgroundGeolocationResponse>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
configure(options: BackgroundGeolocationConfig): Promise<any> {
|
configure(options: BackgroundGeolocationConfig): Promise<any> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user