I would like to know if Meteor can work with my use case.
I have a mobile application that will be available on the App Store. This app contains a small survey that users will respond without internet connection. Then the user will close the application. I then want to transfer the data to the server when the application will be online.
For now, when the application is left open, the data is transfered when app become online. However, when the application is closed and reopened the data that has been entered in the application is lost.
I tried the GroundDB package, but I did not manage to make it work to meet my need.
Can Meteor work with my use case (with or without package)? Do you have any examples or suggestions?
Thanks
You should be able to get this to work by storing the session data between sessions in the localSession
object. You can simply use the amplify package to do that storing for you.
Just make sure to store the data from the survey in amplify, e.g., like this:
amplify.store("survey_data", data);
On startup on the client, you can check whether this data exists:
if (amplify.store("survey_data") { .. }
and then upload it to the server, using a method or inserting into a collection.
Note, this won't happen in the background, but it should work if the user reopens the application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With