We are building an app with Ionic that will work offline and when user input some data, it will have to sync with our servers.
My main concern is about the “when” to sync. When the user make some main actions (accept a task, pack an item, etc) I will try to sync that action to our servers. If not, will queue for latter sync. Then comes the problem: when the user pauses the app. Supose the user make some main action, no connection, so queue the sync. Then the user pauses the app and go for vacation (ok, extreme case here!). The data will not be synced.
Is there any tip, plugin, resource to help me?
Ps: I already seen some plugins to keep the app running but some are not accepted for some stores or requires writing specific code for each platform.