Wifi and 3G same time
Asked Answered
T

3

9

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?

Triplicate answered 31/3, 2011 at 9:11 Comment(3)
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.Money
I'm trying to do the same thing. I found this link which looks useful. mobisocial.stanford.edu/news/2011/03/… However I'm not sure how I can specify switching between them for different things. If you figure that out, please post this information.Betake
This answer might help: https://mcmap.net/q/608529/-can-i-have-both-wi-fi-and-cellular-network-interfaces-open-at-the-same-time-on-android/67081087#67081087Dever
M
4

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.

Maddie answered 23/8, 2012 at 3:21 Comment(0)
P
0

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

Pironi answered 31/3, 2011 at 10:10 Comment(1)
Thx. But this information is from March 2010 (Eclair). So it seems to be a well known problem and maybe something changed since then.Triplicate
O
0

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.

Ouellette answered 31/3, 2011 at 19:17 Comment(1)
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.Triplicate

© 2022 - 2024 — McMap. All rights reserved.