问题1: onCharacteristicChanged 怎么样都收不到数据
解决:将SDK版本从33 降到30 问题解决。
并且:后面不加下面代码:descriptor的写入也能读到数据
BluetoothGattDescriptor descriptor = characteristic.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"));
if (descriptor != null) {
descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
mBluetoothGatt.writeDescriptor(descriptor);
}
2394

被折叠的 条评论
为什么被折叠?



