react-native-ble-manager 11.0.1 → 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
- super.onCharacteristicChanged(gatt, characteristic, data);
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
- super.onCharacteristicRead(gatt, characteristic, data, status);
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ble-manager",
3
- "version": "11.0.1",
3
+ "version": "11.0.2",
4
4
  "description": "A BLE module for react native.",
5
5
  "repository": {
6
6
  "type": "git",