Help Center

Local Navigation

Check if the Wi-Fi transceiver is connected to a wireless access point

  1. Import the net.rim.device.api.system.WLANInfo class.
  2. Create an IF statement that tests the value of WLANInfo.WLAN_STATE_CONNECTED and the value returned by WLANInfo.getWLANState(). The WLANInfo.getWLANState() method checks if a BlackBerry® device has an IP address and can transfer data over a Wi-Fi® network. If the transceiver for the WLAN wireless access family is off, this method returns WLANInfo.WLAN_STATE_DISCONNECTED.
    	if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) {…}

Was this information helpful? Send us your comments.