Bluetooth icon indicating copy to clipboard operation
Bluetooth copied to clipboard

功能完善的蓝牙开源库

Results 7 Bluetooth issues
Sort by recently updated
recently updated
newest added

E/AndroidRuntime: FATAL EXCEPTION: Thread-14 Process: com.zdyb.app, PID: 3465 java.nio.BufferOverflowException at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:164) at java.nio.ByteBuffer.put(ByteBuffer.java:732) at com.stag.bluetooth.BluetoothTransfer.addRecvData(BluetoothTransfer.java:274) at com.stag.bluetooth.helper.BluetoothHelper.recv(BluetoothHelper.java:62) at com.stag.bluetooth.helper.TraditionHelper$2.run(TraditionHelper.java:126) at java.lang.Thread.run(Thread.java:930) E/AndroidRuntime: --->onUncaughtExceptionHappened:Thread[Thread-14,5,main]

我用你的demo就没连接成功过设备 有些设备直接就连接不上 有些设备报错了 2021-07-14 14:16:58.085 8128-8745/com.luo.bluetooth W/System.err: java.lang.InterruptedException 2021-07-14 14:16:58.085 8128-8745/com.luo.bluetooth W/System.err: at java.lang.Thread.sleep(Native Method) 2021-07-14 14:16:58.085 8128-8745/com.luo.bluetooth W/System.err: at java.lang.Thread.sleep(Thread.java:386) 2021-07-14 14:16:58.085 8128-8745/com.luo.bluetooth W/System.err: at java.lang.Thread.sleep(Thread.java:327) 2021-07-14 14:16:58.086 8128-8745/com.luo.bluetooth...

作者你好,请问一下我如果只使用readme中提到的"方式二:原始数据收发"的话还需要实现Protocol相关的东西吗?我现在只OnBluetoothTransmitListener的话在收到数据的时候会报错如下: java.lang.NullPointerException: Attempt to invoke virtual method 'com.stag.bluetooth.protocol.ParseResult com.stag.bluetooth.protocol.Protocol.parse(byte[])' on a null object reference at com.stag.bluetooth.BluetoothTransfer$2.run(BluetoothTransfer.java:158) 我只想接收原始数据的情况下应该如何处理呢,请作者帮忙谢谢。

你好,能不能同时搜索经典和BLE的蓝牙

Android10中无法扫描到蓝牙设备 Android10好像还没有做适配

搜索到蓝牙设备,点击连接,返回状态false,失败,使用MAC连接,也是连接失败。

连接蓝牙设备会报:E/bt_btif: bta_gattc_cache_load: can't open GATT cache file /data/misc/bluetooth/gatt_cache_ f0:c7:7f:fd:14:52 for reading, error: No such file or directory,连接不上。