Interesting Question... Anyone!?!?!

D

David Pope

I have a Samsung Pocket PC mobile phone. It has built-in WiFi.

I've developed an application that runs on the phone.

How can I specify which connection my mobile application should use when
connecting to the internet? Let's say the mobile phone is connected via a
data connection AND WiFi?

Let's say I want to use WiFi if it's connected?

Thanks,

david
 
P

Paul G. Tobey [eMVP]

It will choose based on the 'cost' associated with the connection. If your
dial-up data connection is slower than WiFi, it will use WiFi; if your other
connection is faster (plug-in 100BaseT Ethernet), it will use that. The
'cost' is based, basically, on speed, though; it doesn't know anything about
real cost for WiFi bandwidth or GSM, etc.

You can test which is being used if you connect to a server and the server
checks which IP address the incoming connection originated from. Each of
your available data connections has an IP and you can look at the device and
see which was used. If you aren't behind a firewall/proxy, you can visit
www.showmyip.com with the browser and it will tell you what your IP is.

Paul T.
 
P

Paul G. Tobey [eMVP]

If you're creating a socket, you can bind to a particular IP address, thus
selecting which interface the connection will be created on, yes. That's
the only way I can think of to do it.

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top