Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ambreen-Kanwal20 opened this issue Apr 3, 2024 · 3 comments

Comments

@Ambreen-Kanwal20
Copy link

Ambreen-Kanwal20 commented Apr 3, 2024

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 Ambreen-Kanwal20 changed the title React Native Background Task Termination on Device Lock React Native Background Task Termination on Device Lock in Android OS <= 13 Apr 3, 2024
@ReddyyZ
Copy link

ReddyyZ commented Apr 19, 2024

Same issue here

@SuPeRZ66
Copy link

Same issue here ,react-native0.76 ,android os 14

@linhkiubo98
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants