I want create an Android App in which any user can add some information in some central database and it gets visible to all other users using this App.
So, I want to maintain a centralised database and update the App local database (sqlite database) using this centralised datbase.
So, can anyone please help me in this? I want some idea or code example or pointer to know the things…
PS: I am very new to the Android App development. So, if I would have missed any required information , plesae let me know.
You’ll have to store your remote database on a remote database server. You can use a simple database like MySQL for this. Then you’ll have to create REST API’s (by writing server side code using a language like PHP, Ruby, Python etc) that your Android app can consume to obtain the data from the db.
There are other options that avoid REST API’s as well. See:
How to get from a MySql server to an Android app?
See here for a beginners tutorial on REST:
http://net.tutsplus.com/tutorials/other/a-beginners-introduction-to-http-and-rest/
Once you’ve done that, You have to create Threads or AsyncTasks in your Android app that will call the API’s and parse the obtained data (Usually data is sent in JSON format). Then you can store the parsed data in your local android SQLite database and access it.
Android db tutorial:
http://www.vogella.com/articles/AndroidSQLite/article.html
Android Async tasks and threads tutorial:
http://www.vogella.com/articles/AndroidPerformance/article.html
Android JSON tutorial:
http://www.vogella.com/articles/AndroidJSON/article.html