I'm looking for a way to detect the disconnection of a Bluetooth device immediately after it has happened (1 second max), typically in a "device too far" scenario. Currently I can detect it with a BroadcastReceiver
by getting a BluetoothDevice.ACTION_ACL_DISCONNECTED
, but it takes about 20 seconds to fire... it'd be faster to set a timeout myself, but I think there should be a way to do it at lower level.
Why not do it at a higher level? Bluetooth timeout takes a while - it is inherent with the RF technology.
What about sending a message once per second? If no reply -> disconnected
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With