Connect a BLE device by setting the autoConnect flag to True and then after the device is bonded successfully, delete the bond from the Android Settings ("forget device"). BleManager then immediately connects to the same device again:
if (wasConnected && mInitialConnection) { internalConnect(gatt.getDevice(), null); }
This prevents users from removing the bond for the device because the BleManager will reconnect and repair to the same BLE device once the bond is lost.
Connect a BLE device by setting the
autoConnectflag toTrueand then after the device is bonded successfully, delete the bond from the Android Settings ("forget device").BleManagerthen immediately connects to the same device again:if (wasConnected && mInitialConnection) { internalConnect(gatt.getDevice(), null); }This prevents users from removing the bond for the device because the
BleManagerwill reconnect and repair to the same BLE device once the bond is lost.