dotintent / FlutterBleLib

Bluetooth Low Energy library for Flutter with support for simulating peripherals
Apache License 2.0
535 stars 197 forks source link

Should knownPeripherals() return bondedDevices on Android? #497

Open dokinkon opened 4 years ago

dokinkon commented 4 years ago

The behavior of knownPeripherals are different on Android and iOS. In iOS, knownPeripherals means known by System (OS) In Android, knownPeripheral means known by lib. (Lib should scan first, and keep the scan results)

However, if some peripheral was bonded and connect to Android first, there are no chance for Lib to scan this peripheral. (Because the connected peripheral cannot scanned)

Therefore, knownPeripheral()'s return value should be equal to bondedDevice() on Android. (Known by OS, not just Lib)

What do you think?

dannyalbuquerque commented 4 years ago

https://github.com/Polidea/FlutterBleLib/issues/428