05-21-2009 06:32 AM
I need to identify currently which wireless connection (wifi or gprs) is used for global communication via programming.
Thanks in advance,
05-21-2009 07:50 AM
Thanks for your reply.
But actually i am developing an application which needs to know if the wifi is connected (wifi is ON or off)...if not we will try to use the dataconnection (in this case GPRS).
Please let me know if it is possible to know it programmatically.
05-21-2009 07:54 AM
Compose a special url like that:
String wifiURL = genericURL + ";interface=wifi";
and try to open HTTPConnection with wifiURL
if it opens ok - then wifi enabled, otherwise - not.
05-22-2009 06:08 AM
Yes. you are correct am also using like this.
wifi connection: String wifiURL = genericURL + ";interface=wifi";
GPRS connection: String wifiURL = genericURL;
For example after installed an application i dont know whether user is using wifi connection or gprs connection in that time how can i make a connection without interrupt?
05-22-2009 06:31 AM
It is more non-technical than technical issue.
I do not know end-user audience for your application, but I'll try to suggest.
Show dialog to user like "Select protocol: GPRS or WiFi. Later you can change this setting via Menu-Settings"
Also this dialog should have an option to recognize protocols available. This option won't run by itself.
User will see this option in dialog box and can launch it or specify protocol manually.
In case user has launched automatic recognition - check protocol availability as described and ask to user which to be selected if there is more than one protocol is available.
09-18-2009 07:47 PM - edited 09-18-2009 07:49 PM
is this solved already?
while doing some research i just bumped into this thread.
anyway here's another way to check if wifi is enabled or not.