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
| 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. |