20

I want to make my android connects two networks at the same time, the first one a wifi network to get internet connection and the other one ad-hoc network ( a network between mobiles to share some data), but the android can join only one network at the same time, Any ideas!!

5
  • Use bluetooth for the second one.
    – user634618
    Mar 8, 2011 at 12:25
  • Why do you need it to connect to two networks? That is a very strange requirement and suggests to me you have misunderstood something. If both the devices are connected to the SAME network, then they can share data between themselves, but it is to a degree dependent on the form of network and how it has been configured. You may want to look at [Cloud to Device Messaging][1], and also the [AllJoyn peer-to-peer library from Qualcomm][2]. [1]:code.google.com/android/c2dm/index.html [2]:google.co.uk/…
    – Ollie C
    Mar 8, 2011 at 13:12
  • I want to share internet connection between mobiles, in other words if one mobile has internet access, the others that join this ad-hoc network enable to get the internet connection, so the gateway node must connects to two networks(network that gives him internet connection and ad-hoc one)
    – alex CSD
    Mar 8, 2011 at 13:23
  • 1
    I ran into this today trying to download bf3, wifi had 109kbs, 3g had another hundred, wanted to team the connections for USB tether to speed it up
    – user1012166
    Oct 25, 2011 at 5:56
  • I didn't get it, try to explain more so I could help u
    – alex CSD
    Oct 25, 2011 at 8:35

4 Answers 4

10

It seems to be possible now. Check this out: http://developer.android.com/training/connect-devices-wirelessly/wifi-direct.html

0
9

What you are asking for can not currently be done. You can only be connected to one network at the time. However, there is a standard called WiFi direct that will allow you to do what you are asking for, but it isn't yet implemented in Android. I recently talked with an Android engineer at Google about this, and they are working on it, so it appears you will be able to what you are asking for in the near future, but not right now.

4
  • Per wikipedia WifiDirect was in Android 4.1 in 2012 en.wikipedia.org/wiki/Wi-Fi_Direct
    – teknopaul
    Apr 28, 2019 at 2:51
  • I believe this is very wrong. Google Chromecast pairing protocol uses that feature for quite a long time now. the Chromecast acts as an Access Point while your phone connects to it. But if your phone was already connected to your regular access point (your home router), you dont loose the connection and becomes connected to 2 APs at the same time... A lot of Computer chip authorizes that as well, like Intel 3160... May 19, 2019 at 15:45
  • AND this is perfectly working with an AdHoc + an AP May 19, 2019 at 15:46
  • @JeanLescut, how is this very wrong? When this reply was written back in 2011, Google was active implementing WiFi direct, and it was released for Android shortly after.
    – Andy
    May 19, 2019 at 17:01
1

PC:

This CAN be done with microsoft's virtual wifi switcher. You can connect to two our more wireless networks at once.

PC/Android/iPod/iPhone - Double/Triple connection:

You can connect your pc to your android phone or iPod Touch/iPhone(Jailbroken) with wifi teathering for android and usb teathering for both android an iPodTouch/iPhone.

Android/iPhone: •Connect to cellular network and WiFi.

Virtual WiFi research.microsoft.com/en-us/downloads/994abd5f-53d1-4dba-a9d8-8ba1dcccead7/

-5

Create Two Threads. Use these threads to do the network connection. Threads can run simultaneously. So network connection also will process simultaneously. If you need to provide more priority for one connection set the thread priority high for that thread. Also set less thread priority for another thread.

I have one local device connection and one server connection. Initially both done in AsyncTask(If server connection is going on then i can't connect local device). But i need more preference for local device and also need to do both the communication simultaneously. so i tried this. It was working fine to me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.