Android: updating local database from online database

I have an Android application that works as an inventory application in different stores (you can search for any electronic device according to certain specifications and find which stores sell it and their location). The application comes with a local database, this database must be updated through a soap service in order to have the latest information on electronic devices, offers and stores. The soap service will receive data from another database hosted on the Internet and which will be updated from various sources through the designated website.

The problem that we are facing is that we cannot determine how to update the local database without downloading the entire β€œonline database” from the Internet by the user each time it is updated, since this will be the bandwidth that the DB consuming can reach several megabyte.

We have developed the following solutions:

  • Create updated update scripts that will have SQL transactions executed in the online database, the application will download them and run them to update the local database. The problem with this solution is that if the user does not update the application regularly, they will have to download a lot of scripts to update the next time they are going to update the application, and most likely it will contain many unwanted scripts (elements are added on an early script , and then deleted later) .

  • Download the online database and replace it with a local one. As mentioned above, this can be quite annoying since the size of the database can be several megabytes.

Can someone help me with this problem?

Tyi

+4
source share
1 answer

Best would be Google Cloud Messaging for Android (GCM)

http://developer.android.com/guide/google/gcm/index.html

It is no better than that. This video should lift you up and run in no time.

http://www.youtube.com/watch?v=51F5LWzJqjg

+1
source

All Articles