From 7aa0febdea186b8d74e684fcb67eb7c275810d9e Mon Sep 17 00:00:00 2001 From: Michael Meisel Date: Mon, 11 Aug 2025 15:36:02 -0700 Subject: [PATCH] Clarify when BleManager.close() should be called See #616 --- .../main/java/no/nordicsemi/android/ble/BleManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ble/src/main/java/no/nordicsemi/android/ble/BleManager.java b/ble/src/main/java/no/nordicsemi/android/ble/BleManager.java index 529e86ac..d22e2c86 100644 --- a/ble/src/main/java/no/nordicsemi/android/ble/BleManager.java +++ b/ble/src/main/java/no/nordicsemi/android/ble/BleManager.java @@ -298,10 +298,12 @@ protected void onManagerReady() { } /** - * Closes and releases resources. This method will be called automatically after - * calling {@link #disconnect()}. When the device disconnected with link loss and + * Closes and releases resources. When the device disconnected with link loss and * {@link ConnectRequest#shouldAutoConnect()} returned true you have to call this method to - * close the connection. + * close the connection. If you intend to reuse this instance for multiple connections, + * do not call this method after {@link #disconnect()}. If you are done with this instance, + * call this method from the {@link #disconnect()} completion handler, e.g. + * disconnect().then { close() }. */ public void close() { try {