Hello everyone,
Thank you for reading my question and helping me find the solution.
This is my first post. I read the forum rules. I am sorry if I posted my question in wrong section.
Here are the basic requirements:
- App needs to run offline.
- Then sync data with cloud (our website database) at regular intervals.
- Must run between more than one devices and show latest data.
- You can assume the data file would be around 1MB.
Now, we are not sure when we should sync data with cloud and using what procedure.
We tried triggering the sync event when app goes in background and also when it comes back to screen. But this triggered the sync event a lot many times than required and is not practical. So, we removed these events. For now, we sync with cloud when:
- Either, user press sync button.
- Or logs out from app.
I both cases, we compare the latest time of the data file on local device and on the server(cloud), and tell him whats going to be overwritten by what. This give control in user's hand a bit and is working for us. And is good for multiple devices also.
But we still have few problem:
- Data gets lost if user removes the app without syncing or logging out.
- There are many users that ask this process to happen automatically at some frequency to make it smooth with multiple devices.
- Users get scared when they have to decide yes or no, before data is updated with latest on cloud or on local device.
So, basically we want to make this process more smooth and automatic and we are short of ideas on how to implement this. We have a feeling that many companies must be doing this automatically and there must be a standard way of doing this.
Can someone please help us with ideas and guide to the best way to implement this?
Thanks a ton.
Sincerely,
Manoj