Search code examples
androidtelephony

How to connect to a mobile phone via 3G using Android


I am creating a mobile application on Android that requires devices to communicate with each other over very large distances. When a phone is connected on the internet via WiFi I have the convenience of an IP-Address. But if its connected via 3G I have nothing but the phone number, I can communicate via SMS but I want to use something better like the 3G connection.

So the question goes as how would an android device connect directly to another device through the 3G network if WiFi is not available?

Note: I have thought of a server that acts as a proxy that maps phone numbers to IP address, but if I can establish a direct channel just using the phone number as the ID over 3G.

Thanks in advance to anyone who can provide any information.


Solution

  • Googling about how 3G networks work I found that there is NATing (NAT Traversal) involved with outbound and inbound connections. This is not required when connecting via WiFi. So then doing some search on android+NAT+3G+sockets resulted in my answer to this question.

    Android Client, Pc Server Socket d'ont work over 3g

    https://stackoverflow.com/questions/917385/nat-traversal-with-java