Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930
My Carrier: Verizon

WIFI connection - How do you know the BB is connected?

I know.  A radio listener can do the trick.

 

However, here is what I am trying to get at. There are two level of  WIFI connections. First, the device has been connected to the wireless router and has obtained an IP address. Second, the device has established connection to BIS which is indicated by the bright white wifi icon on the screen.  I can use getWLANState to see if the WLAN is connected, but still don't know which stage of connection it is in. As far as the BB device is concerned, a lot of functions are not going to be available unless I am connected to BIS (say I don't have coverage, only WLAN).

BlackBerry Development Advisor
Posts: 15,727
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: WIFI connection - How do you know the BB is connected?

You can use the CoverageInfo class to determine if the BlackBerry smartphone is connected to BIS or a BES. 

 

There is no way to programmatically determine if the BIS/BES connections are going over the cellular network or over a WiFi network in the case that both networks are connected (i.e. device is connected to a WiFi router but has not established a connection to BIS/BES for least cost routing).

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930
My Carrier: Verizon

Re: WIFI connection - How do you know the BB is connected?

My application uses UDP. So BIS/BES connection is not required. However, I do want to determine which should be used,  OTA or WIFI,  during a session so the user experience can be as seamless as possible  when transitioning from an outdoor area to indoors, or vis versa. I guess I can use the radio strengths as part of the decission making process.

Highlighted
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: WIFI connection - How do you know the BB is connected?

Consider implementing your own switching logic independent of RIM's least cost routing for BES/BIS. Firstly, since you are using UDP, you are limited to Carrier TCP/UDP and WiFi, whereas BES and BIS transports can also go via the USB and Bluetooth, in addition to Carrier and WiFi routes. To make matters more interesting, consider the following:

 

1. BES and BIS transports are not available if the SIM/handheld is not registered/provisioned/permissioned for these services. You application should be able to work in these scenarios, since it doesn't need BES or BIS.

 

2. There could be carrier PDNs or WiFi networks where BES or BIS is blocked whereas your application's traffic is not, and vice a versa.