From da4ce96be4fc0dd763405f53498b11b00974f771 Mon Sep 17 00:00:00 2001 From: Nandan B N Date: Tue, 11 May 2021 11:36:11 +0530 Subject: [PATCH] feat(ble): update with setPin to allow set device pin (#3652) --- src/@ionic-native/plugins/ble/index.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/@ionic-native/plugins/ble/index.ts b/src/@ionic-native/plugins/ble/index.ts index 11adb975d6..8708bb0cae 100644 --- a/src/@ionic-native/plugins/ble/index.ts +++ b/src/@ionic-native/plugins/ble/index.ts @@ -263,6 +263,27 @@ export class BLE extends IonicNativePlugin { return; } + /** + * Set device pin. + * @usage + * ``` + * BLE.setPin(pin).subscribe(success => { + * console.log(success); + * }, + * failure => { + * console.log('failure'); + * }); + * ``` + * @param {string} pin Pin of the device as a string + * @return {Observable} Returns an Observable that notifies of success/failure. + */ + @Cordova({ + observable: true, + }) + setPin(pin: string): Observable { + return; + } + /** * Connect to a peripheral. * @usage