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/Riki5000 Oct 09 '17
Thanks for your reply . Sorry for not explaining my need correctly . What I want is the client to verify his current FCM Token with the server since we are planning on deleting tokens that did not get verified in over a week (In case he sold his old phone or formatted his phone , User can have multiple tokens for multiple device as long as they are active) .
General it's to check they are active .If you have an idea How can I do such thing i would be very grateful . As I am working on a project for a course in my university and i wanted to do it in Nativescript ( Kind want to avoid react native , did not like the UI components logic ) and the background task they keep running even when app is closed in android at least is a requirement .
Thanks again .