feat(ble): add wrapper for starting location notifications (#4399)
This commit is contained in:
parent
6a97dc5e07
commit
755b28e325
@ -564,6 +564,37 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers to be notified when Location service state changes on the device.
|
||||||
|
*
|
||||||
|
* @usage
|
||||||
|
* ```
|
||||||
|
* ble.startLocationStateNotifications(success, failure);
|
||||||
|
* // Or using await with promises
|
||||||
|
* // Note, initial promise resolves or rejects depending on whether the subscribe was successful
|
||||||
|
* await ble.withPromises.startLocationStateNotifications(success, failure)
|
||||||
|
* ```
|
||||||
|
* @returns {Observable<any>} Returns an Observable that notifies when Location is enabled or disabled on the device.
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
observable: true,
|
||||||
|
clearFunction: 'stopLocationStateNotifications',
|
||||||
|
clearWithArgs: false,
|
||||||
|
})
|
||||||
|
startLocationStateNotifications(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop location state notifications.
|
||||||
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
stopLocationStateNotifications(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open System Bluetooth settings (Android only).
|
* Open System Bluetooth settings (Android only).
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user