Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I've been doing my own research but to no avail. I am doing an android app which contains listviews and it needs to query data from a remote database. I would really appreciate it if someone could share good tutorial links that teach that kind of stuff. Sorry, I know this isn't a proper question but I really need some help. Thanks.

like image 994
Tiara Zarin Avatar asked May 23 '13 02:05

Tiara Zarin


3 Answers

You can refer to this tutorial

Or refer to this diagram

like image 97
MDMalik Avatar answered Oct 20 '22 05:10

MDMalik


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.)

like image 3
Calvin Avatar answered Oct 20 '22 05:10

Calvin


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.

like image 3
Paresh Mayani Avatar answered Oct 20 '22 06:10

Paresh Mayani