-
Notifications
You must be signed in to change notification settings - Fork 419
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
autoConnect=true attempts to reconnect even after invoking disconnect() #26
Comments
This fixes the issue for now, but it's not pretty This is a wrapper that holds the BleManager class public void connect() {
forceDisconnect.set(false);
bleManager.setGattCallbacks(this);
try {
bleManager.connect(bluetoothDevice).await();
} catch (RequestFailedException | DeviceDisconnectedException | BluetoothDisabledException e) {
if (forceDisconnect.get()) {
bleManager.setGattCallbacks(this);
bleManager.close();
}
e.printStackTrace();
}
}
public void disconnect() {
forceDisconnect.set(true);
bleManager.disconnectWithoutReconnect();
} |
Hi, I'll look into it. Thanks for the report! |
Hi @maragues-kolibree, |
If you release a new beta, I can test next Monday |
I released beta3. |
Fixed in beta4 :) |
It's fixed, congrats and thanks!! It's beta3, not beta4, just to keep track for the future. |
After this change, is there a way to invoke connect in a way that it keeps trying to reconnect after an error? I know we can do it manually, just wondering. |
I'm trying to disconnect from a device with a connection attempt in progress, but apparently the disconnect is never executed (I never receive any callback) and the autoConnect=true causes an undesired reconnect attempt
Steps
Is this working as intended or is it a bug?
The text was updated successfully, but these errors were encountered: