react-native-ble-manager 8.4.3 → 8.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -359,7 +359,7 @@ Returns a `Promise` object.
|
|
|
359
359
|
- `serviceUUID` - `String` - the UUID of the service.
|
|
360
360
|
- `characteristicUUID` - `String` - the UUID of the characteristic.
|
|
361
361
|
- `data` - `Byte array` - the data to write.
|
|
362
|
-
- `maxByteSize` - `Integer` - specify the max byte size before splitting message
|
|
362
|
+
- `maxByteSize` - `Integer` - specify the max byte size before splitting message, defaults to 20 bytes if not specified
|
|
363
363
|
|
|
364
364
|
**Data preparation**
|
|
365
365
|
|
|
@@ -419,6 +419,7 @@ public class Peripheral extends BluetoothGattCallback {
|
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
421
|
sendBackrError(readCallback, "Error reading " + characteristic.getUuid() + " status=" + status);
|
|
422
|
+
readCallback = null;
|
|
422
423
|
} else if (readCallback != null) {
|
|
423
424
|
final byte[] dataValue = copyOf(characteristic.getValue());
|
|
424
425
|
final Callback callback = readCallback;
|
|
@@ -449,6 +450,7 @@ public class Peripheral extends BluetoothGattCallback {
|
|
|
449
450
|
return;
|
|
450
451
|
}
|
|
451
452
|
sendBackrError(writeCallback, "Error writing " + characteristic.getUuid() + " status=" + status);
|
|
453
|
+
writeCallback = null;
|
|
452
454
|
} else if (writeCallback != null) {
|
|
453
455
|
final Callback callback = writeCallback;
|
|
454
456
|
mainHandler.post(new Runnable() {
|
|
@@ -470,8 +472,8 @@ public class Peripheral extends BluetoothGattCallback {
|
|
|
470
472
|
registerNotifyCallback.invoke();
|
|
471
473
|
Log.d(BleManager.LOG_TAG, "onDescriptorWrite success");
|
|
472
474
|
} else {
|
|
473
|
-
registerNotifyCallback.invoke("Error writing descriptor
|
|
474
|
-
Log.e(BleManager.LOG_TAG, "Error writing descriptor
|
|
475
|
+
registerNotifyCallback.invoke("Error writing descriptor status=" + status, null);
|
|
476
|
+
Log.e(BleManager.LOG_TAG, "Error writing descriptor status=" + status);
|
|
475
477
|
}
|
|
476
478
|
|
|
477
479
|
registerNotifyCallback = null;
|