question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android 10 (Q) does not call BluetoothGattCallback.onConnectionStateChange when turning bluetooth OFF

See original GitHub issue

On 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:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
weliemcommented, Nov 19, 2019

@marian-eremia , thank you for the PR! I will look into this issue and get back to you…

0reactions
marian-eremiacommented, Nov 21, 2019

Yes! It works perfectly. Thank you!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found