Added in API level 30
Builder
class Builder
kotlin.Any | |
↳ | android.net.wifi.WifiInfo.Builder |
Builder for WifiInfo
Summary
Public constructors | |
---|---|
Builder() |
Public methods | |
---|---|
WifiInfo |
build() Build a WifiInfo object. |
WifiInfo.Builder |
Set the BSSID. |
WifiInfo.Builder |
setCurrentSecurityType(securityType: Int) Set the current security type |
WifiInfo.Builder |
setNetworkId(networkId: Int) Set the network ID. |
WifiInfo.Builder |
Set the RSSI, in dBm. |
WifiInfo.Builder |
Set the SSID, in the form of a raw byte array. |
WifiInfo.Builder |
setSubscriptionId(subId: Int) Set the subscription ID. |
Public constructors
Public methods
build
Added in API level 30
fun build(): WifiInfo
Build a WifiInfo object.
Return | |
---|---|
WifiInfo |
This value cannot be null . |
setBssid
Added in API level 30
fun setBssid(bssid: String): WifiInfo.Builder
Set the BSSID.
Parameters | |
---|---|
bssid |
String: This value cannot be null . |
Return | |
---|---|
WifiInfo.Builder |
This value cannot be null . |
See Also
setCurrentSecurityType
Added in API level 31
fun setCurrentSecurityType(securityType: Int): WifiInfo.Builder
Set the current security type
Parameters | |
---|---|
securityType |
Int: Value is android.net.wifi.WifiConfiguration#SECURITY_TYPE_OPEN , android.net.wifi.WifiConfiguration#SECURITY_TYPE_WEP , android.net.wifi.WifiConfiguration#SECURITY_TYPE_PSK , android.net.wifi.WifiConfiguration#SECURITY_TYPE_EAP , android.net.wifi.WifiConfiguration#SECURITY_TYPE_SAE , android.net.wifi.WifiConfiguration#SECURITY_TYPE_EAP_SUITE_B , android.net.wifi.WifiConfiguration#SECURITY_TYPE_OWE , android.net.wifi.WifiConfiguration#SECURITY_TYPE_WAPI_PSK , android.net.wifi.WifiConfiguration#SECURITY_TYPE_WAPI_CERT , android.net.wifi.WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE , android.net.wifi.WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT , android.net.wifi.WifiConfiguration.SECURITY_TYPE_PASSPOINT_R1_R2, android.net.wifi.WifiConfiguration.SECURITY_TYPE_PASSPOINT_R3, or android.net.wifi.WifiConfiguration#SECURITY_TYPE_DPP |
Return | |
---|---|
WifiInfo.Builder |
This value cannot be null . |
setNetworkId
Added in API level 30
fun setNetworkId(networkId: Int): WifiInfo.Builder
Set the network ID.
Return | |
---|---|
WifiInfo.Builder |
This value cannot be null . |
setRssi
Added in API level 30
fun setRssi(rssi: Int): WifiInfo.Builder
Set the RSSI, in dBm.
Return | |
---|---|
WifiInfo.Builder |
This value cannot be null . |
See Also
setSsid
Added in API level 30
fun setSsid(ssid: ByteArray): WifiInfo.Builder
Set the SSID, in the form of a raw byte array.
Parameters | |
---|---|
ssid |
ByteArray: This value cannot be null . |
Return | |
---|---|
WifiInfo.Builder |
This value cannot be null . |
See Also
setSubscriptionId
Added in API level 35
fun setSubscriptionId(subId: Int): WifiInfo.Builder
Set the subscription ID.
Return | |
---|---|
WifiInfo.Builder |
This value cannot be null . |