What is a web service in Android?

Can anyone say what exactly means a web service in anddroid. Each where you can find a way to call webvservice using different protocols. but I don’t understand what exactly is a web service.

+4
source share
2 answers

Web services are similar to web pages in the sense that you access them over the Internet using HTTP. The difference is that you usually get the raw data back instead of the presentation page. For example, you can get the string of records back as addresses. Thus, the transport layer is HTTP. Data for Android is usually encoded in JSON or XML. And you can access the service using HttpClient or URLConnection. Often you can test the web service in a browser to see what you are returning, and you will usually see the data in JSON or XML format. For JSON, you use a library like simple_json to retrieve into a java object. XML is usually processed using SAX Parser. They are really very easy to use.

+8
source

The web service in Android, like any other computer, requests information through HTTP.

“Web services can convert your application into a web application” (from w3schools.com) means you can use web services to provide a richer and more modern experience. For example, if your application is a text editor, it can check web services for updates, and not force the user to check the website for updates. Another example is writing your own Facebook client that will use multiple web service calls and will depend on Facebook for the content presented to the user.

+1
source

All Articles