Answer the question
In order to leave comments, you need to log in
How to connect android application via LAN to java server?
There was a problem connecting the application and the server in java. The fact is that even when I open a socket via InetAddress.getLocalHost I get an ip from it and try to connect to this ip from the application, I get an error of the following kind
W/System.err: java.net.ConnectException: failed to connect to /192.168.42.226 (port 6745) from /:: (port 60132): connect failed: ETIMEDOUT (Connection timed out)
Answer the question
In order to leave comments, you need to log in
It is possible that:
The firewall is blocking connections on the specified port
Incorrectly configured network, blocking IP routing
Timeout is not enough. You can try to increase
(You have a local IP address in error. The application and the server are running on the same network, I hope)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question