08-17-2009 08:26 AM
08-17-2009 09:15 AM
You are checking for the wrong type of WiFi coverage. I'm not sure what the presence of valid and non-disabled WPTCP WiFi SB records indicates, but it definitely does not fully correlate with the availability of WiFi access. When both CoverageInfo.isCoverageSufficient(CoverageInfo.COV
It may well be that the presence of valid and non-disabled WPTCP WiFi SB records indicates that the BlackBerry managed to establish a secure tunnel via WiFi to RIM's network.
08-17-2009 10:50 AM
08-17-2009 11:01 AM
08-18-2009 01:30 PM
FYI, I can use WiFi (;interface=wifi) on my Bold even without a Sim card, so I don't believe that mobile access is required to use WiFi.
08-18-2009 09:39 PM
We have seen the samething and yes it is misleading - we just chose to overide that by testing for a connection to a URL of interest to our application when using ;interface=wifi and if that succeeded then we assumed wifi was available for use.
(We only have Bold devices that have WiFi so not sure if this is an issue on non-Bold non-4.6 devices)
08-19-2009 02:59 AM - edited 08-19-2009 03:09 AM
I think CoverageInfo.isCoverageSufficient(CoverageInfo.COV
You can go through the ServiceBook records and check if each record's cid contains "wptcp" and the uid contains "wifi". If both those are true, then check WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED.
ServiceBook sb = ServiceBook.getSB();
ServiceRecord[] records = sb.getRecords();
boolean wifiIsAvailable = false;
for (int i = 0; i < records.length; i++) {
ServiceRecord myRecord = records[i];
String cid, uid;
if (myRecord.isValid() && !myRecord.isDisabled()) {
cid = myRecord.getCid().toLowerCase();
uid = myRecord.getUid().toLowerCase();
if (cid.indexOf("wptcp") != -1 && uid.indexOf("wifi") != -1) {
wifiIsAvailable = true;
break;
}
}
}
if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED && wifiIsAvailable) {
// wi-fi is available
}
I can't remember exactly where I got the above solution from. I think from a KB article maybe?
EDIT for clarity: The above is exactly like you've described in your first post, but I've tried this on a couple Bolds from different carriers and the service records do contain a wi-fi transport record even with Mobile Network turned off.