|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface WLANConnectionListener
An interface for receiving notifications of WLAN connection events. Objects implementing
this interface can be registered with the WLAN system via WLANInfo.addListener(net.rim.device.api.system.WLANListener).
Receive notifications when the transceiver for the WLAN wireless access family
connects or disconnects with a wireless access point
1.From the net.rim.device.api.system package, import the WLANListener and WLANConnectionListener
interfaces and the WLANInfo class.
2. Invoke Application.addRadioListener(int wafFilter, RadioListener listener) using the
RadioInfo.WAF_WLAN field and a RadioStatusListener object as parameters.
RadioStatusListener listener = new RadioStatusListener()
{
// …
};
Application.addRadioListener(RadioInfo.WAF_WLAN, listener);
3. Register a WLANConnectionListener object by invoking the WLANInfo.addListener() method
using a WLANConnectionListener object as a parameter.
WLANConnectionListener listener = new WLANConnectionListener()
{
// …
};
WLANInfo.addListener(listener);
WLANInfo| Field Summary | ||
|---|---|---|
static int |
WLAN_ASSOCIATION_FAILED
The device could not associate with a WLAN network. |
|
static int |
WLAN_AUTH_FAIL
WLAN supplicant authentication failed. |
|
static int |
WLAN_CONNECTION_TERMINATED
WLAN connection was unexpectedly terminated. |
|
static int |
WLAN_DHCP_UNREACHABLE
The device could not reach a DHCP server. |
|
static int |
WLAN_IP_ADDRESS_LOST
The device's IP address is no longer valid (e.g., lease expired). |
|
static int |
WLAN_OUT_OF_COVERAGE
The device went out of WLAN coverage. |
|
static int |
WLAN_UNSPECIFIED_REASON
WLAN connection failed for an unspecified reason. |
|
| Method Summary | ||
|---|---|---|
void |
networkConnected()
Invoked when the device has connected to a WLAN network. |
|
void |
networkDisconnected(int reason)
Invoked when the device has disconnected from a WLAN network, or when a connection attempt to a WLAN network has failed. |
|
| Field Detail |
|---|
static final int WLAN_UNSPECIFIED_REASON
static final int WLAN_CONNECTION_TERMINATED
static final int WLAN_IP_ADDRESS_LOST
static final int WLAN_DHCP_UNREACHABLE
static final int WLAN_OUT_OF_COVERAGE
static final int WLAN_AUTH_FAIL
static final int WLAN_ASSOCIATION_FAILED
| Method Detail |
|---|
void networkConnected()
void networkDisconnected(int reason)
reason - The reason for the disconnect or failure (one of the WLAN_* constants).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal