我想将我的安卓设备(安卓 4.2.2)与另一个由 BluetothAdapter.startDiscovery() 创建的安卓设备配对。我在运行 BluetoothDevice.connect() 请求配对开始时发现了什么。 但我在运行 connect() 时遇到问题,我得到了
read failed, socket might closed or timeout, read ret: -1
我尝试了 impliment fallback 和 gatclass 中的方法
IOException: read failed, socket might closed - Bluetooth on Android 4.3
也根据
更正UUID和静态 UUID"00001101-0000-1000-8000-00805F9B34FB"
但他们都不适合我
我的代码很大,但 blow 代码很相似(同样的问题)
Android want to send bluetooth pair request to another devices 任何机构都可以帮助 PLZ 吗?
最佳答案
我在另一个问题中找到了答案!这个链接:
Android Connect Bluetooth device automatically after pairing programmatically
在问题中描述如何连接(以及它的答案完成它)
注意:在测试之前确保设备未配对
关于android - AGAIN : read failed, 套接字可能关闭或超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35811611/