I have a little example running that sends a message through a socket from an Android device to the PC.
The server is in C++ using an example from this link and the client is a simple Android app.
The problem that I have is that when I run both on my PC (android app on Eclipse’s emulator) it works correctly, but when I use an android device I keep getting a java.net.ConnectException due to a connection time out.
At first I thought it could be a firewall problem but I created a rule allowing communication through the port that I am using and things kept working in the same way. I tried to switch off the firewall just in case and nothing happened.
I have pinged the PC from Android and viceversa and everything is fine.
Any ideas on what can I be missing? Both devices are on the same network of course!
Thanks in advance.
There appeared to be some kind of firewall blocking incoming requests other than that of Windows. I tried the other way around, starting the communication from Windows’ side and everything works like a charm!