Android 10 (Q) does not call BluetoothGattCallback.onConnectionStateChange when turning bluetooth OFF
See original GitHub issueOn Android 10 (Q), the BluetoothGattCallback.onConnectionStateChange
callback is never called as opposed to lower versions.
As a result, the currently connected peripheral is never removed from the connectedPeripherals
map, thus BluetoothCentral
is left in a faulty state.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
OnConnectionStateChange not called after disconnecting ...
In my log I only see D/BluetoothGatt: cancelOpen() but according to BluetoothGatt.class the service calls our BluetoothGattCallback in ...
Read more >onConnectionStateChange not being called #143 - GitHub
Hi. I have found that sometimes after switching bluetooth state (enable -> disable -> enable) I was not able to reconnect to my...
Read more >BluetoothGattCallback - Android Developers
This abstract class is used to implement BluetoothGatt callbacks. ... when garbage collection determines that there are no more references to the object....
Read more >Android 13: Unable to reconnect reliably to bonded peripheral
It might start working properly on restarting the phone for a bit, but without notice it starts acting up. Have to turn off...
Read more >Diff - platform/frameworks/base - Google Git
BluetoothGattCallback, int); + method public android.bluetooth. ... turned off or if Bluetooth LE Periodic + * Advertising is not supported on this device....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@marian-eremia , thank you for the PR! I will look into this issue and get back to you…
Yes! It works perfectly. Thank you!