Android Bluetooth SPP with Galaxy S3

倾然丶 夕夏残阳落幕 提交于 2019-12-01 13:25:51

There are plenty of Bluetooth incompatibility issues with the new Android ICS. Apparently they messed around with the Bluetooth code to 'improve security'.

A bug I found and reported(which made my entire embedded board not able to connect for a week with any Android ICS device) was that when establishing a connection to an already paired device, Android ICS would require re-authentication - with or without PIN depends if you use Bluetooth SSP (I use it - this means that for me, on Android ICS connection of 2 bonded devices is still possible without user interaction - but it takes a bit longer).

Please vote this bug on Google Bugtracker - maybe someone will fix it...

Maybe this is your problem as well? Can you specify exactly at what line your code breaks? Surround all your Bluetooth system code with try/catch, etc.

Anyway, the new Bluetooth behavior is very very bad, I heard of a lot of people not being able to connect to their old headset because of it.

Your code seems correct, but as Radu said, the new Bluetooth behaviour si not that good. I did have quite some troubles myself (with Android 4.1+) and finally used BlueTerm as basis for my app, since it is opensource and is working (at least for the connexion part).

You can find its sources here :
http://pymasde.es/blueterm/

I hope it can help you !
D

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