sockets - Android using TCP between 2 simulators -
i have 2 apps tcp server , client app. have use redir add tcp:5000:6000
client talk server. if try load apps on 2 actual devices client fails because can't connect.
how can 2 apps on 2 different devices talk each other simulator? i'm using tcp tcp example app
in client.java file change following 2 lines...
private static final int serverport = 5000; private static final string server_ip = "10.0.2.2";
serverport
needs same number in server.java
file, i.e., 6000.
server_ip
needs actual ip address of android device running server app.
Comments
Post a Comment