Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to force network traffic through Wifi or the TMobile network?

I'm wondering if, with the G1, it's possible to force the network traffic to pass through the Wifi or through the Cell GSM network. I need to force an application to connect through the tower network to get some login information. Is this possible? Anyone have any ideas as to how this would be possible? I'm trying to accomplish this inside an app with the Android SDK (Sorry I wasn't more clear about that originally)

like image 772
haseman Avatar asked Mar 02 '09 23:03

haseman


2 Answers

It turns out to be possible using the WifiManager object to disable and then re-enable the connection. You can block it for the duration of a network call if you want to force data over the cell network. I imagine there is a similar GSM network manager out there which will do a similar task for the cell connection.

like image 154
haseman Avatar answered Oct 05 '22 10:10

haseman


I'm assuming that you can simultaneously communicate via either channel, so at some level there aught to be separate network interfaces for each. Since android is based on linux, you could try using ifconfig or a library function to determine which interfaces are available, and which does what. If you can accomplish this, there should be a way to explicitly send/recv via the channel you want (i.e. by communicating via the ip for that interface).

Sorry I couldn't be more specific.

like image 22
Dana the Sane Avatar answered Oct 05 '22 09:10

Dana the Sane