I am wondering if there is any way to check if the device we want to connect to is already connected to the phone. In my case, the device pairs itself to the phone, and connects automatically.
I have not found a way yet to check if the device is already connected before scanning.
I expect something like this:
I may be wrong, but every external library like flutter_reactive_ble or flutter_blue_plus has a flow like:
In my application I just want to know if a device with a certain mac address is connected to the phone the app is running on.
According to this Github issue , you can use FlutterBluePlus.instance.connectedDevices
to see a list of all devices connected since FlutterBluePlus was initialized. That would allow you to check the list for a specific device.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.