Mo'nes Qasaimeh
Mo'nes Qasaimeh

Reputation: 43

How call rest services from android side?

I am creating a php server side with rest services API, but I don't know how to call function register method from android side.

Here is a link to php with REST API that I use. I get Error 404 when using this code.

Upvotes: 0

Views: 330

Answers (4)

Paritosh
Paritosh

Reputation: 2147

Check this answer explaining communication between Android, and REST API.

Upvotes: 0

Gamma
Gamma

Reputation: 1

Try AsyncTask for this work. AsyncTask is used to perform background work.

Upvotes: 0

Codelord
Codelord

Reputation: 1120

There are many ways to call web service whether they are restful or other api. Simple way is to use http Post method using asynctask but which is very well known. Here is link where you will know how to consume those web services https://geekjamboree.wordpress.com/2011/11/22/asynctask-call-web-services-in-android/

But I am suggesting to use android third party library for this. There are 4 to 5 libraries available for use but I personally prefer https://github.com/koush/ion. Which is very easy and handle all kind web services.

Upvotes: 1

ElTête
ElTête

Reputation: 585

You have several way to do it. I recomend you RETROFIT.

Upvotes: 0

Related Questions