Bluetooth pairing is lost after a socket close
I am working on an application that connects to a device using a bluetooth socket. Everything is running smoothly on 2 different HTC handsets with Android 2.2 but I just tried a brand new Sony Xperia running on Android 2.3 and I am experiencing a really weird behavior.
When I start the application, it will scan for devices and initiate a pairing request with the device. The pairing request is received and accepted by the user, the connection is made and a socket is opened.
The problem is that as soon as the socket is closed, the pairing is "forgotten" by the phone. The device is listed as unpaired in the Bluetooth开发者_如何学Go devices list, and the application must initiate a new pairing request each and every time it needs to open the connection.
Has anything changed in the way pairing is managed with android 2.3? Is there a new requirement to close the socket and avoid loosing the pairing?
Thx in advance, Pierre
精彩评论