How to use the react-native-ble-manager.writeWithoutResponse function in react-native-ble-manager

To help you get started, we’ve selected a few react-native-ble-manager examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zhanguangao / react-native-ble-manager-demo / src / BleModule.js View on Github external
return new Promise( (resolve, reject) =>{
            BleManager.writeWithoutResponse(this.peripheralId, this.writeWithoutResponseServiceUUID[index], this.writeWithoutResponseCharacteristicUUID[index], data)
                .then(() => {
                    console.log('Write success: ',data);
                    resolve();
                })
                .catch((error) => {
                    console.log('Write  failed: ',data);
                    reject(error);
                });
        });		
    }
github zhanguangao / react-native-ble-manager-demo / demo for v3.2.1 deprecated / app / BleManager.js View on Github external
return new Promise( (resolve, reject) =>{
            BleManager.writeWithoutResponse(this.peripheralId, this.writeServiceUUID, this.writeCharacteristicUUID, data)
                .then(() => {
                    console.log('Write success: ',data);
                    resolve();
                })
                .catch((error) => {
                    console.log('Write  failed: ',data);
                    reject(error);
                });
        });