PhilipsHue / flutter_reactive_ble

Flutter library that handles BLE operations for multiple devices.
https://developers.meethue.com/
Other
667 stars 334 forks source link

Deinitialize in onDetachedFromEngine on Android, foreground service problem #802

Open Ilya-Vys opened 1 year ago

Ilya-Vys commented 1 year ago

Describe the bug We need to have ble connection on foreground service, to get actual data even app is terminated. 5.0.3 version unclude feature https://github.com/PhilipsHue/flutter_reactive_ble/pull/519 This feature close our foreground service connection when app terminated by user or system.

To Reproduce Open connection on foreground service. Terminate app.

Expected behavior Do not close foreground service connection.

Smartphone / tablet Android devices

Peripheral device Custom BLE device

Additional context Foreground service and app have different instances of FlutterReactiveBle, cause service works on isolate. Why instance on service closing? How to solve it properly?