WifiManager
#
DescriptionThe WifiManager API provides access to the wifi device capability.
#
Interface#
PropertiesWifiManager.enabled
read-only
A boolean indicating whether the wifi is on (true) or off (false).WifiManager.macAddress
read-only
A string representing the wifi adapter's MAC address.WifiManager.connection
read-only
An object providing information about the current connection (status and network in use).WifiManager.connectionInformation
read-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 notopenNetworkNotify
is currently enabled.
#
Event handlersWifiManager.onenabled
A handler for theenabled
event; it is triggered when the wifi has been turned on.WifiManager.ondisabled
A handler for thedisabled
event; it is triggered when the wifi has been turned off.WifiManager.onstatuschange
A handler for thestatuschange
event; the event object is aMozWifiStatusChangeEvent
instance.WifiManager.onconnectioninfoupdate
A handler for theconnectioninfoupdate
event; triggered any time the connection information changes. The event object is aMozWifiConnectionInfoEvent
instance.WifiManager.onopennetwork
An event listener that is called with notification about the open wifi network available.
#
MethodsWifiManager.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.