ServerSocket is standard Java. Had you even bothered to search Google for:

java serversocket tutorial

you would have found nearly 100,000 hits, including:

http://download.oracle.com/javase/tutorial/networking/sockets/clientServer.html
http://zerioh.tripod.com/ressources/sockets.html
http://www.javaworld.com/javaworld/jw-12-1996/jw-12-sockets.html
http://oreilly.com/catalog/javanp2/chapter/ch11.html
http://www.kodejava.org/examples/216.html

And so on.

>From an Android standpoint, you will need your ServerSocket to be
managed by a Service with its own background thread, most likely.

Also, bear in mind that what you are trying to do will not work unless
you and the server are on the same local network. Android devices are
not designed to be servers in this fashion.

A more general-purpose solution would be to use push services, like
C2DM, Xtify, and Urban Airship.

On Tue, May 24, 2011 at 7:34 AM, Hitendrasinh Gohil
<[email protected]> wrote:
> Hi,
> "You will need a server part and a client part for this. Try setting up a
> chat server and client application based on Sockets
>  and you would know."
>
> server is already there which sends data to android client.but at android
> side how can i handle this.
> whether i need to create both client-server at client side,if yes than how?
>
> and if i need to create only client at android client side than how?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.6 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to