Closed clockwork189 closed 2 years ago
This plugin does not directly control the bluetooth connection. If you can prove it's my code causing the issue I'll look into it, but I feel like this is something that belongs in the official repo.
Yeah you are right. If anything the issue is on the Flutterfire/FirebaseMessaging side. I'll dig in myself and see if I can figure out some workaround. Thanks for the insight.
If you do figure out a fix for the Polar SDK please PR it over there so I can get it in here.
Hello,
I've essentially replicated this bug: https://github.com/PhilipsHue/flutter_reactive_ble/issues/195 in my project, but while just using the polar library and firebase.
This issue seems to just popup if I call:
FirebaseMessaging.onBackgroundMessage(onBackgroundMessage);
and passing onBackgroundMessage as a top-level function.My main function looks like below:
Currently, I am getting around this issue by commenting out or rather not using the FirebaseMessaging.onBackgroundMessage(onBackgroundMessage); feature. However if I do un-comment it out, the app fails silently, i.e. when I call connect, it just searches for the device but does not result in a connection.
I am wondering if what remonh87 says here has something to do with it? https://github.com/PhilipsHue/flutter_reactive_ble/pull/200