Problem in Bluetooth connection over SPP in Android 2.3.3 in Nexus One?

天涯浪子 提交于 2020-03-05 05:42:25

问题


I just updated Nexus One with Android 2.3.3 and it seems that the bluetooth connection over SPP have stopped working in my app.

The same app works alright in HTC Desrire with Android 2.2 and the same app use to work properly on Nexus One too. The problem started after upgrading to Android 2.3.3.

Can anyone let me know what may be the issue?


回答1:


I was able to solve this issue by using createInSecureRfcommSocket API and also there is a way of connecting through reflection for insecure connections.




回答2:


I found the same issue. I was not able to get the reflection to work for insecure comms, but the public interface did work.

The symptom is that the connect() call throws the IOException "Connection Refused" every time on 2.3.3, while the code worked fine on 2.2.

I opened a defect against android here: http://code.google.com/p/android/issues/detail?id=15919&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars



来源:https://stackoverflow.com/questions/5246735/problem-in-bluetooth-connection-over-spp-in-android-2-3-3-in-nexus-one

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!