fix(background-geolocation): enum not string (#3131)

based on [this stackoverflow issue](https://stackoverflow.com/questions/57293829/argument-of-type-location-is-not-assignable-to-parameter-of-type-backgroundge/57302110#57302110) it seems passing the string causes problems in (some / all) scenarios
This commit is contained in:
Matthew Harris 2019-08-09 16:07:39 +07:00 committed by Daniel Sogl
parent e37a7221b1
commit 5cc91bc79a

View File

@ -499,7 +499,7 @@ export declare enum BackgroundGeolocationIOSActivity {
* BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise the platform will not ask you for background tracking permission.
*
* ```typescript
* import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationResponse } from '@ionic-native/background-geolocation';
* import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationEvents, BackgroundGeolocationResponse } from '@ionic-native/background-geolocation';
*
* constructor(private backgroundGeolocation: BackgroundGeolocation) { }
*
@ -516,7 +516,7 @@ export declare enum BackgroundGeolocationIOSActivity {
* this.backgroundGeolocation.configure(config)
* .then(() => {
*
* this.backgroundGeolocation.on('location').subscribe((location: BackgroundGeolocationResponse) => {
* this.backgroundGeolocation.on(BackgroundGeolocationEvents.location).subscribe((location: BackgroundGeolocationResponse) => {
* console.log(location);
*
* // IMPORTANT: You must execute the finish method here to inform the native plugin that you're finished,