Android Bluetooth Connection - Service Discovery Failed

后端 未结 7 1248
情深已故
情深已故 2020-12-17 00:08

I\'m trying to create a basic bluetooth application, for testing the device.

I got the code from developer.android. Here is the link : http://developer.android.com/

7条回答
  •  一向
    一向 (楼主)
    2020-12-17 01:14

    Make sure that your app is not trying to connect while the adapter is busy with discovery: It appears the problem was that before I called

    clientSocket.connect()
    

    I needed to call

    btAdapter.cancelDiscovery()
    

    This helped solve the same problem for me Matts Reco

提交回复
热议问题