docs(background-geolocation): add return types and platforms

This commit is contained in:
Ibby 2017-03-01 19:53:50 -05:00
parent fc879926b2
commit 07c867d98e

View File

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