react-native-background-timer icon indicating copy to clipboard operation
react-native-background-timer copied to clipboard

React Native Background Task Termination on Device Lock in Android OS <= 13

Open Ambreen-Kanwal20 opened this issue 1 year ago • 3 comments

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.

Ambreen-Kanwal20 avatar Apr 03 '24 07:04 Ambreen-Kanwal20

Same issue here

ReddyyZ avatar Apr 19 '24 17:04 ReddyyZ