Try to use three tcps, one is for wifi , second is for cellular
network, third is for android.

On Dec 29, 11:43 am, DigiGuy <digigo...@gmail.com> wrote:
> I'm working on an application that will run on a phone where the phone
> will be a station on a private Wi-Fi network.  The phone will be a
> station, not an access point, and the private Wi-Fi network does not
> route to the Internet.  My application needs to communicate with
> servers on the Internet as well as devices on the local Wi-Fi network,
> so it needs to have connections on both networks at the same time.
> I've been trying to figure out how to do this.
>
> I've been trying the technique described in the discussion "Can
> Android 2.X connect to 3G and Wifi data networks simultaneously?", but
> it is not working well.  What I find is that when I enable the
> cellular network by calling
> ConnectivityManager.setNetworkPreference(ConnectivityManager.TYPE_MOBILE),
> any sockets I have open on the Wi-Fi network are closed.  I haven't
> tried it, but I suspect the same thing will happen to sockets on the
> cellular network when I switch back to Wi-Fi.  Another problem is that
> these calls operate on a global level, changing the network settings
> for the entire phone, not just the application.  Switching the network
> set up globally like this will interfere with any other app that
> happens to be running on the phone.  Even after my application exits,
> the phone continues to run with the last network configuration it set.
>
> I'm looking for a way to have connections open on both the cellular
> data and Wi-Fi networks at the same time, and without interfering with
> other applications running on the phone.  Does anyone know how to do
> this?  Does anyone know if this is possible?
>
> Thanks for your help.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to