WifiManager
Description#
The WifiManager API provides access to the wifi device capability.
Interface#
Properties#
WifiManager.enabledread-only
A boolean indicating whether the wifi is on (true) or off (false).WifiManager.macAddressread-only
A string representing the wifi adapter's MAC address.WifiManager.connectionread-only
An object providing information about the current connection (status and network in use).WifiManager.connectionInformationread-only
An object providing extra information about the current connection or null if the device is not connected to the wifi.WifiManager.openNetworkNotify
Returns whether or notopenNetworkNotifyis currently enabled.
Event handlers#
WifiManager.onenabled
A handler for theenabledevent; it is triggered when the wifi has been turned on.WifiManager.ondisabled
A handler for thedisabledevent; it is triggered when the wifi has been turned off.WifiManager.onstatuschange
A handler for thestatuschangeevent; the event object is aMozWifiStatusChangeEventinstance.WifiManager.onconnectioninfoupdate
A handler for theconnectioninfoupdateevent; triggered any time the connection information changes. The event object is aMozWifiConnectionInfoEventinstance.WifiManager.onopennetwork
An event listener that is called with notification about the open wifi network available.
Methods#
WifiManager.associate()
Allows to associate (and connect) a device with a given network. Returns a DOMRequest.WifiManager.forget()
Allows to make a device no longer associate with a given network. Returns a DOMRequest.WifiManager.getKnownNetworks()
Allows to retrieve the list of all the networks the device was associated with. Returns a DOMRequest.WifiManager.getNetworks()
Allows to retrieve the list of all the networks available in the area surrounding the device. Returns a DOMRequest.WifiManager.setPowerSavingMode()
Allows the wifi adapter to enter/exit power saving mode. Returns a DOMRequest.WifiManager.setStaticIpMode()
Allows to configure a static IP address for the device on a given network. Returns a DOMRequest.WifiManager.wps()
Allows to connect the device to a network using the network's WPS capability (if any). Returns a DOMRequest.
WifiManager by Mozilla Contributors is licensed under CC-BY-SA 2.5.