jamesisaac / react-native-background-task

Periodic background tasks for React Native apps, cross-platform (iOS and Android), which run even when the app is closed.
MIT License
1.1k stars 110 forks source link

Run task when in foreground and keep running when in background #12

Closed pottercomuneo closed 7 years ago

pottercomuneo commented 7 years ago

Hi, I'm not sure if this is the best place to ask this, because it's not properly an issue, but as the title suggests I need to know: does this module allow me to launch the task immediately and if the app goes to background continue the execution? Thank you so much and please tell me if I wasn't clear.

jamesisaac commented 7 years ago

Sadly not. The iOS/Android APIs this project uses aren't really designed for that sort of work. They're very much designed for, as the README describes, periodic tasks, up to 30 seconds, scheduled by the OS while the app is in the background.

Whether there is a way with another library to do what you describe (launch a foreground task which continues in the background), I wouldn't know.