Wifi and 3G same time
For my App I need Data from both, a local Network and the Internet. The local Network (Wifi) has no connection to the internet so I have to use the mobile connection (3G for Example). But whenever I connect to the local Network, 3G stopps. After asking the Samsung Service, there is no way to change that in the UI. But they couldn't tell me, if there is a programmable Interface for that.
There is a mobile access point inside, so there is a way to connect a Wifi device to the Internet (which means that both, a wifi and a 3G connection is possible the same time in that way). But for my App the phone/tab has to connect to the existing Network and use the 3G for Internet.
So this is my question here.
Is there a way to connect to an existing Network and using 3G for Internet the same time?
I've looked at the code used by Android WiFi Tether. I think that will be of great help for your work. Click here
What it does is load the WiFi module once 3G is turned on. Then it use iwconfig/ifconfig to configure the interfaces and run it. They further make appropriate changes to the routing table to ensure tethering. You could make changes to routing options to suit your requirements.
Update: I worked on the approach I mentioned here. Please find my progress on this link
Bottomline is that it is possible to use both 3G and WiFi concurrently on Android Phones.
根据此线程,似乎不可能:http://groups.google.com/group/android-developers/browse_thread/thread/a2a0e72b170dfb53
Would connecting to one network and then the other sequentially be sufficient? You can pragmatically turn wifi on and off if you include the right permissions. See How to use 3G Connection in Android Application instead of Wi-fi? for specifics.
链接地址: http://www.djcxy.com/p/62394.html下一篇: Wifi和3G同时进行