diff --git a/src/plugins/background-geolocation.ts b/src/plugins/background-geolocation.ts index 6e4e82f19..efa511364 100644 --- a/src/plugins/background-geolocation.ts +++ b/src/plugins/background-geolocation.ts @@ -389,18 +389,21 @@ export class BackgroundGeolocation { /** * Inform the native plugin that you're finished, the background-task may be completed - * NOTE: IOS, WP only * @returns {Promise} */ - @Cordova() - static finish(): Promise { } + @Cordova({ + platforms: ['iOS', 'Windows Phone'] + }) + static finish(): Promise { return; } /** * Force the plugin to enter "moving" or "stationary" state - * NOTE: IOS, WP only + * @returns {Promise} */ - @Cordova() - static changePace(isMoving: boolean) { } + @Cordova({ + platforms: ['iOS', 'Windows Phone'] + }) + static changePace(isMoving: boolean): Promise { return; } /** * Setup configuration @@ -413,27 +416,30 @@ export class BackgroundGeolocation { /** * Returns current stationaryLocation if available. null if not - * NOTE: IOS, WP only * @returns {Promise} */ - @Cordova() + @Cordova({ + platforms: ['iOS', 'Windows Phone'] + }) static getStationaryLocation(): Promise { return; } /** * Add a stationary-region listener. Whenever the devices enters "stationary-mode", * your #success callback will be executed with #location param containing #radius of region - * NOTE: IOS, WP only * @returns {Promise} */ - @Cordova() + @Cordova({ + platforms: ['iOS', 'Windows Phone'] + }) static onStationary(): Promise { return; } /** * Check if location is enabled on the device * @returns {Promise} Returns a promise with int argument that takes values 0, 1 (true). - * NOTE: ANDROID only */ - @Cordova() + @Cordova({ + platforms: ['Android'] + }) static isLocationEnabled(): Promise { return; } /** @@ -452,18 +458,21 @@ export class BackgroundGeolocation { * Method can be used to detect user changes in location services settings. * If user enable or disable location services then success callback will be executed. * In case or error (SettingNotFoundException) fail callback will be executed. - * NOTE: ANDROID only * @returns {Promise} */ - @Cordova() + @Cordova({ + platforms: ['Android'] + }) static watchLocationMode(): Promise { return; } /** * Stop watching for location mode changes. - * NOTE: ANDROID only + * @returns {Promise} */ - @Cordova() - static stopWatchingLocationMode() { } + @Cordova({ + platforms: ['Android'] + }) + static stopWatchingLocationMode(): Promise { return; } /** * Method will return all stored locations. @@ -472,10 +481,11 @@ export class BackgroundGeolocation { * by the system * or * - option.debug is true - * NOTE: ANDROID only * @returns {Promise} */ - @Cordova() + @Cordova({ + platforms: ['Android'] + }) static getLocations(): Promise { return; } /**
 @@ -487,18 +497,20 @@ export class BackgroundGeolocation { /** * Delete stored location by given locationId. - * NOTE: ANDROID only * @returns {Promise} */ - @Cordova() + @Cordova({ + platforms: ['Android'] + }) static deleteLocation(locationId: number): Promise { return; } /** * Delete all stored locations. - * NOTE: ANDROID only * @returns {Promise} */ - @Cordova() + @Cordova({ + platforms: ['Android'] + }) static deleteAllLocations(): Promise { return; } /** @@ -510,13 +522,13 @@ export class BackgroundGeolocation { * * BackgroundGeolocation.Mode.FOREGROUND * BackgroundGeolocation.Mode.BACKGROUND
 - * - * NOTE: iOS only - * + ** * @param {number} See above.
 * @returns {Promise} */ - @Cordova() + @Cordova({ + platforms: ['iOS'] + }) static switchMode(modeId: number): Promise { return; } /**