Will it work regardless of where the two devices are and what are their IP addresses?
It should, even if you are on a private network, as long as you have your port configured correctly forward on each internal route.
Does Android support an inbound connection if I make it a server?
He must
Can I connect two phones directly using Sockets?
I don't understand why not
Give it a try! You may see some problems with your ISP or carrier, allowing only some ports, try 80, 443 or 22 if higher port numbers give you problems.
source
share