In my applications, I track I / O errors. If successful read()takes place, then I reset the counters. If the error counts rise high enough (usually 4-5 is a good number), I think the connection is dead, and continue to tear it down and rebuild it.
The SDK says the intention is to change the state, but I don’t understand whether this applies to the specific connection or the bluetooth adapter itself here :
, ACTION_STATE_CHANGED , , Bluetooth . EXTRA_STATE EXTRA_PREVIOUS_STATE, Bluetooth, . STATE_TURNING_ON, STATE_ON, STATE_TURNING_OFF STATE_OFF. , Bluetooth .