From: sachin on
hello everyone,
i have a application which would run in the background and send some
data that is been captured on the device to the server .
my problem is, under some condition the app has to transmit data only
using WI-FI connection and under some other condition it has to
transmit only using the data connection available on the phone through
GPRS/EDGE/3G .
how do i instruct the application to use a only a particular
connection to send data to the server.
please advise.

Thanks
sachin
From: Paul G. Tobey [eMVP] paultobey _at_ earthlink _dot_ on
You haven't told us much about what code is sending the data, so I'll assume
that you're using a Socket. Bind the socket to the IP address of the network
adapter that you want to use to send the data and then send, as before.

Paul T.

"sachin" wrote:

> hello everyone,
> i have a application which would run in the background and send some
> data that is been captured on the device to the server .
> my problem is, under some condition the app has to transmit data only
> using WI-FI connection and under some other condition it has to
> transmit only using the data connection available on the phone through
> GPRS/EDGE/3G .
> how do i instruct the application to use a only a particular
> connection to send data to the server.
> please advise.
>
> Thanks
> sachin
> .
>