Search code examples
androidsocketssystem-callsports

Using Tcp Sockets on real Android devices


Can i use Tcp Sockets to connect two Android Devices(not Emulators) giving the proper IP adress taken by a WIFI network? Should i do port forwarding through a specific port? Is it possible to open a port programmatically using system calls?


Solution

  • Can i use Tcp Sockets to connect two Android Devices(not Emulators) giving the proper IP adress taken by a WIFI network? Read up on this: http://developer.android.com/guide/topics/wireless/wifip2p.html

    Should i do port forwarding through a specific port? From taking a quick peak at that site it seems to you have to do it, however i suggest that you read the link and see for yourself.

    Is it possible to open a port programmatically using system calls? Not anyway that i know if, have to log into your router and open it.