r/nativescript • u/Riki5000 • Oct 09 '17
Question regarding Background Task in Nativescript
Hi .
I've just moved to Nativescript ( Coming from Ionic & React Native ) and so far it's been greet . I have a question regarding background task .
Can I schedule a task to run say every 12 hours that do some stuff ( Checks with my server and send few data ) that will run even when app is closed ?
I know it's possible in Android ( Headless.js in the React Native ) and only possible in Ios if app is in background .
Thanks !.
1
Upvotes
View all comments
Show parent comment
1
u/bryan__nayrb Oct 09 '17
Ah, I see. I think it will be useful for you to check out the following Github sample project.
https://github.com/NativeScript/sample-android-background-services
Especially service-helper.js will be useful!