i\'m using SPP profile for connect to my device:
Set devices = ba.getBondedDevices();
for(BluetoothDevice bd : devices)
{
I solved this problem by letting my BluetoothSockets be managed by a Service running in its own process. I open, close, read, and write the sockets by passing Messages to and from the Service. If the app crashes, the Service shuts down cleanly, closing the sockets. (It does not shut down cleanly if it's running in the same process as the app.)