Skip to content

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

@Ambreen-Kanwal20

Description

@Ambreen-Kanwal20

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions