flutter_blue icon indicating copy to clipboard operation
flutter_blue copied to clipboard

CentralManager Init: Background Usage and API MISUSE

Open trueb2 opened this issue 4 years ago • 22 comments

Previously, https://github.com/pauldemarco/flutter_blue/pull/191 had changes for background usage on iOS and Android.

https://github.com/boskokg/flutter_blue/releases/tag/0.11.0 claims Android background usage was added in this repo, but no PR number was referenced and the iOS changes are not present currently.

There are some conflicts with master now because the centralManager initialization was moved to the first handled message. This causes a race on whatever first message is received and startup of CoreBluetooth. The workaround is to make a call like flutterBlue.instance.isOn().

The reason for this change was to delay requested permissions popups from firing as soon as the app opens the first time, so it was a necessary but undocumented regression.

trueb2 avatar Dec 03 '21 16:12 trueb2