I have a strange issue with bluetooth socket. If I create socket and later close application, android device freeze with very hight CPU load.
Here my sample code:
<
A solution I found working (for a samsung galaxy mini) - that is quite unfriendly to the user, and not good "design" (but the broadcom firmware bug is not good "design" anyway) - but it's better than letting the user's phone freeze - is to turn OFF the bluetooth after we're done:
In both my onDestroy() and onBackPressed() - I call my cleanup() function that has something like this:
if(mBluetoothAdapter != null)
{
mBluetoothAdapter.disable();
}
mBluetoothAdapter = null;