Eulante
Eulante

Reputation: 309

How implement RESTFUL services in Android?

I want to ask you a question about REST web service and Android. I want to make an application which communicates with a remote database and display the values in a listview. Now, the problem at the moment is how to communicate with a remote database: I've read about REST services and I've understand they are necessary if you want to communicate with a db in a safe way, but I don't know how to make it really. My idea of this application is: I connect to a .php page placed in a remote server (using a free domain) and there i create the query to the database, so:

ANDROID APPLICATION -----> PHP FILE ----> REMOTE DATABASE

The question are:

Thank you.

Upvotes: 1

Views: 7986

Answers (2)

Nick Mitchinson
Nick Mitchinson

Reputation: 5480

For the php part you should be able to find a basic walk-through by googling. For example: http://www.9lessons.info/2012/05/create-restful-services-api-in-php.html.

Upvotes: 0

Nicklas Gnejs Eriksson
Nicklas Gnejs Eriksson

Reputation: 3415

First result in Google:

http://www.techrepublic.com/blog/app-builder/calling-restful-services-from-your-android-app/1076

It has a code example of fetching data from Android via an exposed web resource.

Also other SO Qs about this, for example: How to call a RESTful web service from Android?

Did you really search that hard?;)

Since you wrote an Android question I assume you know the PHP part so, otherwise it shouldn't be more than a google search away!

Upvotes: 3

Related Questions