Skip to content

Commit

Permalink
Merge pull request #543 from muscardinus/muscardinus/bugfix/disable-c…
Browse files Browse the repository at this point in the history
…haracteristic-notifications

Bug fix: Write correct descriptor value when attempting to disable notifications
  • Loading branch information
philips77 committed Feb 14, 2024
2 parents 3112b52 + 6125ba8 commit 3ef4709
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -969,7 +969,7 @@ private boolean internalDisableNotifications(@Nullable final BluetoothGattCharac
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
log(Log.DEBUG, () ->
"gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x00-00)");
return gatt.writeDescriptor(descriptor, BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE) == BluetoothStatusCodes.SUCCESS;
return gatt.writeDescriptor(descriptor, BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE) == BluetoothStatusCodes.SUCCESS;
} else {
log(Log.DEBUG, () -> "descriptor.setValue(0x00-00)");
descriptor.setValue(BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE);
Expand Down

0 comments on commit 3ef4709

Please sign in to comment.