02-25-2010 02:09 AM
hi
I want to check whether my device is connected to internert or not ? in order to do that i have use RadioInfo, WLANInfo, CoverageInfo classes... and use dialog box which tells user conncted or not.
it works as per the connection when i first load the simulator....
if i close all the connection from my manage connection it tells me not connected.....
if i enable only WLAN it i get it is connected but it is unable to make any connection to internet.
if i enable only EDGE it i get it is connected but it is unable to make any connection to internet.
if i reload the simulator and try to run same it works well. but once i change any connection to on or off i cant make any connection to internet.
please help me out its relly urgent please please
02-25-2010 11:34 PM
02-26-2010 12:00 AM
hey
m running JDE Os 4.7 and 9000 and 9500 simulator
can you please tell me now what should i do?
Thanks
Gunjan
02-26-2010 02:14 AM
what do you mean by "it is connected but is unable to make any connection to internet"?
02-26-2010 03:49 AM
You can check it by :
if((CoverageInfo.isCoverageSufficient(CoverageInf
{
System.out.printls("Internet available");
}
else
{
{
System.out.printls("Not available");
}
Try it ..
Hope it works.
Thnx
01-01-2011 10:13 PM
This did not work for me. Is
RadioInfo.isDataServiceOperational();
suffficient?
Bill Roth
01-04-2011 07:32 AM
For further ideas, have a look at:
01-04-2011 02:57 PM
Love the sample code. Thanks!
01-03-2012 02:02 AM
I used the function below to check if internet is not available, available through wifi or available through Mobile Network. For each I append the appropriate text so that if it finds wifi connectivity, It appends string to connect through wifi etc
import net.rim.device.api.system.CoverageInfo;
import net.rim.device.api.system.DeviceInfo;
import net.rim.device.api.system.WLANInfo;
private static String getConnectionString()
{
String value="";
if(CoverageInfo.isOutOfCoverage())
{
Dialog.alert("No Internet Coverage. Enable Internet And Try Again");
// return "";
}
else if(WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED)
{
Dialog.alert("Wireless Found");
value="interface=wifi";
// return "";
}
else if(CoverageInfo.getCoverageStatus() == CoverageInfo.COVERAGE_DIRECT )
{
Dialog.alert("Coverage Direct");
value="deviceside=true";
// return "";
}
return value;
}