views:

104

answers:

1

Hello,

I'm currently making an app where it would communicate with a simple database that will be hosted on a server. The database will only have three columns, a _id, title, and url link. I've successfully done this using the phone's local database using SQLiteDatabase but I want it so that any other phone can also access the same database. I will be updating the server's database (adding new rows) on the computer so the phones should reflect these changes.

I believe I will be using sqlite on the server too to create the database. Basically I want all changes to be handle on the server side instead of doing it from the phone like how I am with the local database. The phone should be able to access the data and use it accordingly. Can anyone explain me a way to do this?

Thank you in advance!

+1  A: 

You will need to expose the database through a Web interface. A good way will be to use a RESTful web service. You could represent each row as an object and use an HTTP GET request to retrieve it, an HTTP POST to update it and an HTTP PUT or HTTP POST to insert new entries. Of course you need to use a web technology and an application server of some kind.

kgiannakakis