Wifi Management
OpenWifiSettings
open wifi setting page in android settings.
IsNetworkAvailable
check is network connected
GetWifiStrength
get wifi strength, the same with name rssi value in android
RegisterWifiReceiver
register wifi callback, get wifi state/info dynamic
Parameter | Description |
wifiHandler | callback when wifi state change |
networkStateHandler | callback when network state change |
rssiChangeHandler | callback when rssi change |
UnRegisterConnectionChangeReceiver
unregister wifi callback.
Warning: this method will remove all listeners registered by “RegisterWifiReceiver”
SetWifiEnabled
enable/disable wifi, enable wifi do not mean wifi is connected.
Parameter | Description |
enable |
|
GetWifiState
return current wifi state, exp: 0 for netStateConnecting, 1 for netStateConnected, etc.
IsWifiEnable
if wifi is enable state
GetConfiguredWifi
Return a list of all the networks configured for the current foreground user. contains params: networkId/SSID/BSSID/priority/allowedProtocols/allowedKeyManagement /allowedAuthAlgorithms/allowedPairwiseCiphers/allowedGroupCiphers
GetConnectedWifiSSID
Return ssid about the current Wifi connection, if any is active
StartScanWifi
Request a scan for access points. Returns immediately. The availability of the results is made known later by means of an asynchronous event sent on completion of the scan.
GetScanResult
Request the results of the latest access point scan.
GetMacAddress
Get mac address if wifi is connected
ConnectWifi
connect Wifi by wifi name (ssid) and password
Parameter | Description |
ssid | wifi name |
password | wifi password |
wificipherType | wifi cipher type, such as web |
ConnectStaticIpWifi
connect static ip wifi
Parameter | Description |
ssid | wifi name |
password | wifi password |
wificipherType | wifi cipher type, such as wep |
prefixLength | ip prefix length |
ipAddress | ip address |
gateway | dns1 gateway |
dns | dns |
DisconnectWifi
disconnect wifi
RemoveWifiBySsid
remove wifi by ssid
Parameter | Description |
ssid | wifi name |
Last updated