If I wake up 5 sensors so that they advertise and immediately connect to them with Mds.connect(), the connections are created nicely, and when I call:
String cb = BleManager.INSTANCE.getConnectedBleDevicesCb().connectedDevices;
I get a log line to Android Studio:
However, if I wake up 5 sensors, wait until they stop advertising, start connecting to them with with Mds.connect(), wait for 1 minute, and make the sensors advertise again, the connections are not created successfully meaning that the onConnectionComplete() is never called. Instead, the sensors get stuck, and I have to kill the Android app to to use them again.
In this case, the log line in Android Studio repeats one value multiple times as follows:
This issue harms usability when working with multiple sensors as if one sensor has a problem, the user needs to kill the app and reconnect all the sensors.
I used Android Studio on Linux, with Android mobile lib version 1.28.1 and firmware version 1.7.2 on the sensors. I tested this on Samsung Galaxy S7, LG K8 (2017), and Nexus 5X phones, and the bug happens consistently on all the devices.