We have developed a health application that operates in tandem with a device transferring data via Bluetooth. The device undergoes continuous data transfer. However, when the application is running on both iOS and Android devices, it gets cut off in the background after a certain duration, which negatively influences the user experience.
We understand that the termination of an application's background services after a certain period is usually associated with how both iOS and Android manage system resources. Similarly, before implementing formatted background tasks in our application, we encountered this issue. Therefore, we integrated formatted background tasks in our application on both platforms, but the problem persists.
We decided to investigate how other Bluetooth devices behave on both iOS and Android platforms, and noticed that the Bluetooth connection never interrupts when devices like electronic watches are connected. However, we haven't been able to achieve the same reliability of connection with our device.
We would greatly appreciate any technical insights, experiences, or recommendations on managing such situations. Your suggestions will be immensely valuable to us.
Note: The app was developed with Flutter.
Thanks in advance for your help.