How to connect an android app to a remote database? [closed] How to connect an android app to a remote database? [closed] database database

How to connect an android app to a remote database? [closed]


To communicate with the remote databse, you require web service which can fetch data from or suit data to remote database.

I am not sure about which web platforms are you using currently but I would suggest you to go with REST with JSON.


How about a simple web service in the middle?

It helps to prevent you putting database username/pw directly in the app too.

App -> Http requests -> Web service -> Database

The Http requests can be done via Android HttpClient

The web service can be in php for example. (There is a lot example for php to database on google.)