Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise( (resolve, reject) =>{
BleManager.stopNotification(this.peripheralId, this.nofityServiceUUID, this.nofityCharacteristicUUID)
.then(() => {
console.log('stopNotification success!');
resolve();
})
.catch((error) => {
console.log('stopNotification error:',error);
reject(error);
});
});
}
stopNotification(index = 0) {
BleManager.stopNotification(this.peripheralId, this.nofityServiceUUID[index], this.nofityCharacteristicUUID[index])
.then(() => {
console.log('stopNotification success!');
resolve();
})
.catch((error) => {
console.log('stopNotification error:',error);
reject(error);
});
}