I am making an Android application, but i have a problem. I have no idea what is the best way to update the database in the client application from my server (if the user click the “check for update” button). How should i set the current database version in client-side so that i can try to compare with the latest database version in server ? how should i check from server if there is any new database update ? should i use PHP / java server ?
My Case :
User installed my app that come with an sqlite database version 1.0
But later, i updated the sqlite database to version 2.0 and upload it to server (i havent think about what kind of server will i use, any idea (java or php) ?)
and i want when the user click “check for updates”, the app will check for the latest database version, if the latest db version is 2.0 (which is >1.0) then it will download and replace the old sqlite db (1.0).
How should i set the sqlite database version in client-side (Android) and compare it with the latest version in server-side?
Any help will be really appreciated.
Thanks !
Based on your comment to this answer…
If your problem is that simple I would suggest to do following:
http://www.yourserver.tld/?dbversionhttp://www.yourserver.tld/?dbgetYour server always knows which version is the newest and could update the returned timestamp or the returned (and incremented) version number…
PHP or Java: I would recommend PHP for such a simple task (also because every webspace offers that option). I would realize that by a simple GET request (like demonstrated before). Java is just overkill (but still possible).