Urgent: Basic help with TCP socket communication

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Urgent: Basic help with TCP socket communication

Postby madhunandan » Thu Dec 09, 2010 11:18 am

Hi,

I have a basic question (probably some might feel dumb) on TCP communication. I found the code for TCP server and client. I want the emulator or the phone (HTC Desire with Android 2.2) to receive messages and display them.

(In my situation, I receive messages from a Rhapsody based application with which I am trying to communicate via TCP sockets).

As a starting point, I want to know where should I run the client and the server. I think the server should "Run as an Android application" from Eclipse on the emulator (or phone) and the client as a Java app in Eclipse. Please correct me if I am wrong. Also, please tell me where can I see the received messages (if the server is running on the emulator or the phone).

Thank you for any suggestion and time spent on this.

Grüßen,
Madhu Nandan
User avatar
madhunandan
Junior Developer
Junior Developer
 
Posts: 10
Joined: Wed Dec 08, 2010 4:40 pm
Location: Rüsselsheim, Germany

Top

Re: Urgent: Basic help with TCP socket communication

Postby alideo » Thu Dec 09, 2010 1:04 pm

Normally the server code would be run on a server container and the client code would run on the android Phone or emulator
AliDeo
alideo
Freshman
Freshman
 
Posts: 5
Joined: Thu Mar 04, 2010 9:04 pm

Re: Urgent: Basic help with TCP socket communication

Postby madhunandan » Thu Dec 09, 2010 1:15 pm

alideo wrote:Normally the server code would be run on a server container and the client code would run on the android Phone or emulator


Thank you for the response.

In my situation, as I have mentioned before, I need to receive messages from another application. So I thought I need to run the server on the emulator (or Android phone) and, for test purpose, run the client as a Java application in Eclipse so that I can send messages to the server (emulator or phone).

And the other part, with the above case, how do I see the received messages?

Madhu Nandan
User avatar
madhunandan
Junior Developer
Junior Developer
 
Posts: 10
Joined: Wed Dec 08, 2010 4:40 pm
Location: Rüsselsheim, Germany

Re: Urgent: Basic help with TCP socket communication

Postby ericone » Sun Dec 26, 2010 6:00 am

You better need to use a service then on the android device.
ericone
Freshman
Freshman
 
Posts: 4
Joined: Sat Dec 25, 2010 7:59 pm

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 5 guests