wood burning stoves 2.0*
The moose likes Android and the fly likes Android Emulator communication from different machines Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Android Emulator communication from different machines" Watch "Android Emulator communication from different machines" New topic
Author

Android Emulator communication from different machines

Nithish nit
Greenhorn

Joined: Sep 20, 2012
Posts: 1
I've referred the developer site and have implemented the following idea that works fine for two emulator instances running on same machine.

•A is you development machine
•B is your first emulator instance, running on A
•C is your second emulator instance, also running on A

and you want to run a server on B, to which C will connect, here is how you could set it up: 1.Set up the server on B, listening to 10.0.2.15:
2.On B's console, set up a redirection from A:localhost: to B:10.0.2.15:
3.On C, have the client connect to 10.0.2.2:

For example, if you wanted to run an HTTP server, you can select as 80 and as 8080: •B listens on 10.0.2.15:80
•On B's console, issue redir add tcp:8080:80
•C connects to 10.0.2.2:8080

Now for two diffenrent machines I have to make C connect to A's ipaddress:8080. This doesn't work though. What Address should be given in place of 10.0.2.2 for this to work? The IPAddress alone is apparently not sufficient.
I've been stuck with this for abt a week. Any help would be appreciated

If i just use the Ipaddress of the server(with 8080 port) from the client, i get java.net.conectExcperion:Connection Rfused : Connect
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Android Emulator communication from different machines
 
Similar Threads
Http Connection
Android Emulator as server in Socket communication
Configuring database on local machine
Two Servers: Network Adapter error
Thin Servlet Redirector