• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Data transfer problem in application

AndDevloper

Lurker
Hi Everybody,
I started learning android just a couple of weeks ago, so I am very new to it. I required some help regarding this application that I want to build.
My application is one that requires a data transfer between a client and a server. The client is running on android and the client sends some data at a very frequent rate to the remote server, which then compiles/understands the data so obtained. How can this be implemented very efficiently in android. What kind of classes/resources will be required?

My second question is that does Android have the capability to run on a tablet as of now? If so, how will that happen? Could you please explain a little?

I'll be really grateful if someone could help me out here. I am finding this a little tough and could do with some help here.
Thanks in advance.
 
I've already done a client/server where the client was running on android.
To connect and send data to the server I used the this code:

Socket socket = new Socket();
SocketAddress addr = new InetSocketAddress("200.185.55.52", 9000);
socket.connect(addr);
OutputStream os = socket.getOutputStream();
DataOutputStream dos = new DataOutputStream(os);

You can use 'dos' to write all data that you want to.
Don't forget to close the streams and the socket when you finish to write the data by calling dos.close() and socket.close().
 
Thanks Fabio,
That helped a lot. My other question was can we run android on a tablet as of now? I mean can we load the whole OS on a tablet using some mechanism?
 
Back
Top Bottom