react-native-job-queue icon indicating copy to clipboard operation
react-native-job-queue copied to clipboard

feat: support running in background (paused) state

Open GustavoBonfimS opened this issue 7 months ago • 3 comments

Context

React Native has a limitation where setTimeout does not run while the app is in the "background" state (paused but not completely closed). This issue affects the task queue, causing tasks to execute only when the app returns to the "active" state.

Solution

This Pull Request adds a check for the app's state before using setTimeout. If the app is in the "background" state, the function is executed immediately, ensuring the task queue works correctly.

GustavoBonfimS avatar Jul 15 '24 12:07 GustavoBonfimS