Created
January 8, 2024 21:07
-
-
Save tdcolvin/d8da22b6514974dfc76f3454403e2394 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val callback = object: BluetoothGattCallback() { | |
override fun onDescriptorWrite( | |
gatt: BluetoothGatt?, | |
descriptor: BluetoothGattDescriptor, | |
status: Int | |
) { | |
super.onDescriptorWrite(gatt, descriptor, status) | |
if (status == BluetoothGatt.GATT_SUCCESS) { | |
Log.v("bluetooth", "Descriptor ${descriptor.uuid} of characteristic ${descriptor.characteristic.uuid}: write success") | |
} | |
else { | |
Log.v("bluetooth", "Descriptor ${descriptor.uuid} of characteristic ${descriptor.characteristic.uuid}: write fail (status=$status)") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment