-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth reconnect fix android15 #1463
Bluetooth reconnect fix android15 #1463
Conversation
If we trap code 147 on BT disconnect and then call lostConnection(), the app will attempt reconnect every 30 seconds and autoreconnect works even after prolonged disconnect.
Thank you. Perhaps a on/off button and/or reconnect timeout set (30 sec - 300 sec) would be a good idea. Great work. |
I just tested these changes on a Pixel 3 - Android 12 - API 31 and it doesn't effect its ability to reconnect. |
@@ -259,7 +259,7 @@ class RadioInterfaceService @Inject constructor( | |||
* @return true if the device changed, false if no change | |||
*/ | |||
private fun setBondedDeviceAddress(address: String?): Boolean { | |||
return if (getBondedDeviceAddress() == address && isStarted) { | |||
return if (getBondedDeviceAddress() == address && isStarted && isConnected) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intended behavior. We specifically track isStarted
just for this call. Please revert this change, and it should be good to merge.
This reverts commit 27b1e4d.
This pull fixes two issues.