Reputation: 16729
How to check availability of internet connection(Wifi, GPRS, EDGE) in Blackberry.
Upvotes: 2
Views: 919
Reputation: 2049
Try this....it worked for me .
protected static boolean isInternetAvailable() {
boolean flag = false;
if(WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED){
flag = true;
}
else if(RadioInfo.isDataServiceOperational()){
flag = true;
}
return flag;
}
Upvotes: 4