We have a cordova/phonegap app which allows users to fill out a survey on a weekly basis. The survey can be filled out regardless of online/offline status. However we would like to send the survey data to the server as soon as possible, which means as soon as the device is online.
Currently the app includes a background process, which sends the data to the server. The problem is that this background process is stopped when the app is terminated.
We would like to know what the options are for making sure that the data is sent to the server regardless of the status of the app (i.e. similar to an email sync service). Are their ways to approach this in platform neutral way, or do we need to investigate native implementations for this?