Android + PHP Restful API. This is just a simple example to explain how restful services work.
Here I am trying to exaplin the basics of rest api. How the api really works and for what purpose you can use it. To test the api follow this steps:
-
Copy android and php side programs on your computer. Make sure you have all the setup to run php and android programs.
-
Run the android program. You will see the login screen where you have to enter the username and password.
-
Enter usernam as 'user123' and password as 'test123'
-
And click on login. This will send a HTTP request to server.
-
On the server side, enterted credentials will be matched and if it matches correctly it will create a json and set
success to 'true' else 'false'
-
You can see the json response received belon the login button on the screen.
I hope this applicaton helps beginners to get to know how restful api works.