mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
docs(background-geolocation): add return types and platforms
This commit is contained in:
parent
fc879926b2
commit
07c867d98e
@ -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<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static finish(): Promise<any> { }
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Windows Phone']
|
||||
})
|
||||
static finish(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Force the plugin to enter "moving" or "stationary" state
|
||||
* NOTE: IOS, WP only
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static changePace(isMoving: boolean) { }
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Windows Phone']
|
||||
})
|
||||
static changePace(isMoving: boolean): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Setup configuration
|
||||
@ -413,27 +416,30 @@ export class BackgroundGeolocation {
|
||||
|
||||
/**
|
||||
* Returns current stationaryLocation if available. null if not
|
||||
* NOTE: IOS, WP only
|
||||
* @returns {Promise<Location>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Windows Phone']
|
||||
})
|
||||
static getStationaryLocation(): Promise<BackgroundGeolocationResponse> { 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<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Windows Phone']
|
||||
})
|
||||
static onStationary(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Check if location is enabled on the device
|
||||
* @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; }
|
||||
|
||||
/**
|
||||
@ -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<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
static watchLocationMode(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Stop watching for location mode changes.
|
||||
* NOTE: ANDROID only
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
static stopWatchingLocationMode() { }
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
static stopWatchingLocationMode(): Promise<any> { 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<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
static getLocations(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
@ -487,18 +497,20 @@ export class BackgroundGeolocation {
|
||||
|
||||
/**
|
||||
* Delete stored location by given locationId.
|
||||
* NOTE: ANDROID only
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
static deleteLocation(locationId: number): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Delete all stored locations.
|
||||
* NOTE: ANDROID only
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
static deleteAllLocations(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
@ -510,13 +522,13 @@ export class BackgroundGeolocation {
|
||||
*
|
||||
* BackgroundGeolocation.Mode.FOREGROUND
|
||||
* BackgroundGeolocation.Mode.BACKGROUND
|
||||
*
|
||||
* NOTE: iOS only
|
||||
*
|
||||
**
|
||||
* @param {number} See above.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
static switchMode(modeId: number): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user