react-native-ble-manager 11.0.0 → 11.0.2
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.
|
@@ -419,12 +419,15 @@ public class Peripheral extends BluetoothGattCallback {
|
|
|
419
419
|
|
|
420
420
|
@Override
|
|
421
421
|
public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
|
|
422
|
+
super.onCharacteristicChanged(gatt, characteristic);
|
|
422
423
|
onCharacteristicChanged(gatt, characteristic, characteristic.getValue());
|
|
423
424
|
}
|
|
424
425
|
|
|
425
426
|
@Override
|
|
426
427
|
public void onCharacteristicChanged(@NonNull final BluetoothGatt gatt, @NonNull final BluetoothGattCharacteristic characteristic, @NonNull final byte[] data) {
|
|
427
|
-
|
|
428
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
|
429
|
+
super.onCharacteristicChanged(gatt, characteristic, data);
|
|
430
|
+
}
|
|
428
431
|
try {
|
|
429
432
|
String charString = characteristic.getUuid().toString();
|
|
430
433
|
String service = characteristic.getService().getUuid().toString();
|
|
@@ -465,14 +468,16 @@ public class Peripheral extends BluetoothGattCallback {
|
|
|
465
468
|
|
|
466
469
|
@Override
|
|
467
470
|
public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
|
|
471
|
+
super.onCharacteristicRead(gatt, characteristic, status);
|
|
468
472
|
onCharacteristicRead(gatt, characteristic, characteristic.getValue(), status);
|
|
469
473
|
}
|
|
470
474
|
@Override
|
|
471
475
|
public void onCharacteristicRead(@NonNull final BluetoothGatt gatt,
|
|
472
476
|
@NonNull final BluetoothGattCharacteristic characteristic,
|
|
473
477
|
@NonNull byte[] data, int status) {
|
|
474
|
-
|
|
475
|
-
|
|
478
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
|
479
|
+
super.onCharacteristicRead(gatt, characteristic, data, status);
|
|
480
|
+
}
|
|
476
481
|
mainHandler.post(() -> {
|
|
477
482
|
if (status != BluetoothGatt.GATT_SUCCESS) {
|
|
478
483
|
if (status == GATT_AUTH_FAIL || status == GATT_INSUFFICIENT_AUTHENTICATION) {
|
package/ios/BleManager.m
CHANGED
|
@@ -15,6 +15,8 @@ RCT_EXTERN_METHOD(scan:
|
|
|
15
15
|
scanningOptions:(nonnull NSDictionary*)scanningOptions
|
|
16
16
|
callback:(nonnull RCTResponseSenderBlock)callback)
|
|
17
17
|
|
|
18
|
+
RCT_EXTERN_METHOD(stopScan:(nonnull RCTResponseSenderBlock)callback)
|
|
19
|
+
|
|
18
20
|
RCT_EXTERN_METHOD(connect:
|
|
19
21
|
(NSString *)peripheralUUID
|
|
20
22
|
options:(NSDictionary *)options
|