Hi guys, please tell me how to run the application as a service, to at interval could do Ajax request to the server.
Need to notify users about changes in the application.
platforms: android, ios
Hi guys, please tell me how to run the application as a service, to at interval could do Ajax request to the server.
Need to notify users about changes in the application.
platforms: android, ios
or use push notifications
@gmarziou has the best option for you.
Google and Apple will most likely reject an app making http calls in the background for long periods of time as it is a really bad thing to do for the user. Having the server run this call like a CRON script or something set up on a timer, and then using the push notifications are the best.
However, Enterprise applications or privately distributed applications can take advantage of something like this https://github.com/katzer/cordova-plugin-background-mode which might help you out if that fits your needs too.
In my fitness application I really wish I could utilize it, but as it’s going in stores I had to create a system to track everything between the app losing focus and coming back into focus. Just one of those things we’ve gotta work around. Best of luck!
Thanks guys, indeed, in my situation it is better to use push notification