I’m developing an Android application very much like the the Android Market (now Google Play) in which I offer various softwares to user for installation. The difference is here that I want the user to be able to browse the applications even when there is no internet connectivity. That means I have to store the data on a local database (here I want to use sqlite) and this data needs to be updated periodically.
Now my question is this. How should I implement this update mechanism to have the best performance and availability?
I think I have a few options which is as following:
- To update the whole database every time. This way I have to download every single record every time to have the updated content.
- To update the data based on the date they were added. Although this seems a good way, but there is a possibility that the previously added content may be edited and they are omitted in this approach. Also there is this possibility that some of the items are deleted.
These were what I thought I can do but I don’t know which is best way to go on?! Also I am open to any other suggestion that might work here.
As per my concern, If you put some listener for your server side database which are notified when any data record is modified, added or deleted. And using Web-Service or Google Android C2DM Service it will notify your application to update for particular database record from your server.
(I may be wrong or any other method also available for easy implementing)