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?

- 91
- 2
- 5
-
I don't have an answer to you but it feels like something Android would be able handle (at least in theory) considering that having both enabled is what the built-in Wifi tethering does. – Fredrik Mar 31 '11 at 19:48
-
1I'm trying to do the same thing. I found this link which looks useful. http://mobisocial.stanford.edu/news/2011/03/let-wifi-and-3g-connection-work-together-by-hacking-connectivityservice-java/ However I'm not sure how I can specify switching between them for different things. If you figure that out, please post this information. – Dave Jul 04 '11 at 21:23
-
This answer might help: https://stackoverflow.com/questions/8718434/a/67081087#67081087 – Always Learning Dec 23 '21 at 01:21
3 Answers
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.

- 117
- 3
- 14
It doesn't seem to be possible according to this thread: http://groups.google.com/group/android-developers/browse_thread/thread/a2a0e72b170dfb53

- 752
- 7
- 21
-
Thx. But this information is from March 2010 (Eclair). So it seems to be a well known problem and maybe something changed since then. – Skolleus Mar 31 '11 at 10:34
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.

- 1
- 1

- 8,222
- 7
- 46
- 82
-
No, but thx. This wouldn't be fast enough. The 3G connecten will be used every second while the wifi connection will be used every 40ms. – Skolleus Apr 05 '11 at 11:10