currently I’am developing an Android native app which have to communicate with a server (for ex. via REST) to load, save data etc.
Now I’m considering the offline scenario. I also want the user to save data if the mobile phone has currently not network connection. If the network connection is up again I want to sync the user data with my server.
Do anyone know some best practice to achieve this. I’m considering using a couchdb for replication, but I’m wondering if there are other nice ways to support offline use of my app.
Thx a lot.
you can use broad cast receiver for this purpose
if connectivity is changed(on or off) we can know that using this broadcast receiver…and start a assynctask for u r refresh and load the new data from server