Despite enabling battery optimization setting, I'm facing an issue in my React Native Android application where background tasks, managed by react-native-background-timer and react-native-background-actions, get terminated when the device is locked. This leads to the automatic closure of the application in the background.
The problem occurs specifically with the BackgroundTimer.setInterval function, which runs a countdown interval. When the device is locked, the background task abruptly ends after five minutes, disrupting the intended functionality of my application.
I'm seeking guidance or suggestions on how to prevent this termination of background tasks when the device is locked, ensuring uninterrupted operation of critical functionalities.
Any assistance or insights would be greatly appreciated. Thank you.
Despite enabling battery optimization setting, I'm facing an issue in my React Native Android application where background tasks, managed by react-native-background-timer and react-native-background-actions, get terminated when the device is locked. This leads to the automatic closure of the application in the background.
The problem occurs specifically with the BackgroundTimer.setInterval function, which runs a countdown interval. When the device is locked, the background task abruptly ends after five minutes, disrupting the intended functionality of my application.
I'm seeking guidance or suggestions on how to prevent this termination of background tasks when the device is locked, ensuring uninterrupted operation of critical functionalities.
Any assistance or insights would be greatly appreciated. Thank you.