Server Client Communication in android Part-I

Server Client in Android is an important concept to learn its because  most application that has been developed in android is not standalone so they are totally dependent on the internet connection. So to communicate the application with the server you have to use the server side programming languages like php , jsp ,etc.






So the Client side the android whereas the Server side will be the server side programs. The flow of information in the network is basically done by the HTTP request and android has its inbuilt classes for that purpose.
Which the server catches by the method of the post and get methods .For example if we passed a string name with value "android" .

So in server side the retrieval of  the name value is done by
I am using php there its done like it

$name=$_POST["name"];

If you echo $name you will see that the android is being printed.

There different ways to send the information and you will be need extra library if the level of information is increased like its an image or a mime type object you are sending over the internet as there are greater concern in regard to the security of the data.

For example there is a scenario like you have a handful of  images that are being used by your application and these images are actually stored on the server. In usual cases the loading time of image takes much more longer as well as the not much effective.So for this purpose a library is being used more commonly that is called the volley it has function and classes which allow the application loads the images faster.

The technique is widely used in case of showing daily feeds like news application does and another also as they have only images and text view in them.
The software that is commonly used so that you can run server on your computer is wamp server , xampp server , apache etc. These are the free tools that anyone can download and use in their systems.

So download it and try it .In next i will help you to understand how to send http request and access the localhost through the android emulator.For the next part click here http://mithunmanoharan.blogspot.com/2014/12/server-client-communication-in-android_10.html

Icon are form the sites http://www.flaticon.com/ so  rights reserved of the respective owners

Comments

Popular posts from this blog

Making Bootable Pendrive with .bat file

Ek Beej Tha Gaya Bahut Hee Gaharaee Mein Boya - Nanha Paudha

R-W-W (Real, Win, Worth it ) - Boost your idea