I am trying to develop an application which creates two sockets for file transfer, one from each 3G/4G and WiFi interface.
To enable this I need to make sure that both 3G and WiFi are up and running. Also they should be able to forward packets to their relevant GW router.
I am aware that ConnectivityService.java and ConnectivityManager.java in android ensures that only one interface is active at a time.
I tried to go through Android WiFi tether source code (http://code.google.com/p/android-wifi-tether/) to understand how they ensure 3G downloads data and WiFi is used to transfer data to local network. I inferred from their tether.edify file that they load wifi driver with 3G on and then use the same script to update the routing fwding address, NAt rules etc to realize a WiFi tether.
My question is how such an approach is able to bypass android's connectionManager and service to enable two interfaces ON simultaneously ? Also for WiFi tether, WiFi interface acts as AP, whereas my requirement is to ensure that both WiFi and 3G fwd the data to their gateway. Is this realizable with appropriate routing/NAT table ?
Please share your experience.
Thanks.
UPDATE: I was able to solve this problem, refer this link for detail.