Here is the goal:
The farmer has a smartphone and enters his barn to take an inventory using the app. Sometimes his phone does not receive an Internet connection in the barn, so the application must work offline, store data offline and then synchronize it with the cloud after reconnecting it.
The farmer will also only need to register and register the application once, and then every time they open the application, it should simply open on the main screen and no longer ask for account information. How exactly can this be done?
I use Meteor to build the app, and Meteor in Cordoba to pack the app. I saw GroundDB: https://github.com/GroundMeteor/db
As far as I can tell from the docs, I know how to create a local collection and use collection.insert to add data to this collection.
But I'm lost on how to encode the application to open on the phone without the need for the Internet and discover if the Internet is present or not?
Then, how to determine if the Internet has returned, and then synchronize all the data stored offline?
If someone can help lay out how this will work, it will be very useful!
source share