ios – BLE connectivity within the background in Flutter


I’ve received a CGM peripheral which advertises each 5 minutes, being discoverable just for a number of seconds. The purpose is to have the ability to collect glucose information each 5 minutes, particularly within the background.

The Flutter code works nicely within the foreground for each Android and iOS units. After scanning and discovering the peripheral as soon as, I will try and reconnect to it with a timeout for subsequent readings, and disconnect instantly after gathering information.

The problem is connecting whereas app is the background. The timeout choice for flutterBlueDevice.join(timeout: Period(seconds: 300) would not appear to attend in any respect, reporting no machine has been discovered. I perceive that BLE connectivity is restricted in OS environments.

Is there any manner I may get round this in Flutter? If not, what method ought to I take advantage of to combine native corebluetooth partially in my code for connection half? Additionally, what connection technique works greatest for steady readings on this case?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles