Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Developer
jeffm
Posts: 26
Registered: 11-20-2008

How to check for actual Internet connectivity (over WiFi)?

Hi.

 

We are using the following API to check for WiFi availablity:

 

 

WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED

 

However, this does not necessarily tell you whether or not you can actively access the Internet via WiFi. The classic example is Starbucks where you can connect to the hotspot all you want, but in order to access the Internet you have to use the browser to log in with credentials.I also thought this might help:

 

 

CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_DIRECT,RadioInfo.WAF_WLAN,false)

 

 

But it appears to be equal to the first result. How do you all normally handle this scenario? Thanks.

Please use plain text.
Developer
Posts: 1,474
Registered: 04-14-2009

Re: How to check for actual Internet connectivity (over WiFi)?

I wonder if the "Starbucks" case is now handled by the new Hotspot API where the BlackBerry OS detects that it's connected to WiFi but the hotspot requires web-based authentication for full Internet access.

 

As to Internet connectivity, the most reliable method is to establish a connection over WiFi an check whether it works. Alternatives, which might not always work, include checking BIS-B/MDS connectivity over WiFi, or checking th WiFi WPTCP service book.

Please use plain text.