您好,欢迎来到筏尚旅游网。
搜索
您的当前位置:首页安卓蓝牙调试笔记

安卓蓝牙调试笔记

来源:筏尚旅游网
问题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);
}

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- efsc.cn 版权所有 赣ICP备2024042792号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务