Closed Marika-Fukazawa closed 8 months ago
could be due to this: https://github.com/boskokg/flutter_blue_plus/commit/0fa2610e9fdfc813d9580c3bd132b710861e11fe
perhaps it should be this (adding a check for Platform.isAndroid):
if (_autoConnect.contains(r.remoteId)) {
if (_adapterStateNow == BmAdapterStateEnum.on) {
if (Platform.isAndroid == false) {
var d = BluetoothDevice(remoteId: r.remoteId);
d.connect(autoConnect: true, mtu: null);
}
}
}
should be fixed 1.31.17
Requirements
Have you checked this problem on the example app?
No
FlutterBluePlus Version
1.31.16
Flutter Version
3.19.3
What OS?
Android
OS Version
Android 13
Bluetooth Module
Mobile integrated
What is your problem?
My app uses AutoConnect to repeatedly connect and disconnect from peripherals. When using FlutterBluePlus 1.31.16, as it repeatedly connects and disconnects, the connection relationship logs increase and the same indicate is processed multiple times. We have confirmed that this does not occur in versions prior to 1.31.15.
I will paste a simple sample code to connect with AutoConnect when disconnected and the logs from running it. (The code for the scanning part is omitted) After the initial connection, I disconnected from the peripheral, then sent advertisements from the peripheral, waited for the connection, and disconnected from the peripheral, repeating 5 times.
Logs