Added in API level 30

Builder


class Builder
kotlin.Any
   ↳ android.net.wifi.WifiInfo.Builder

Builder for WifiInfo

Summary

Public constructors

Public methods
WifiInfo

Build a WifiInfo object.

WifiInfo.Builder
setBssid(bssid: String)

Set the BSSID.

WifiInfo.Builder
setCurrentSecurityType(securityType: Int)

Set the current security type

WifiInfo.Builder
setNetworkId(networkId: Int)

Set the network ID.

WifiInfo.Builder
setRssi(rssi: Int)

Set the RSSI, in dBm.

WifiInfo.Builder

Set the SSID, in the form of a raw byte array.

WifiInfo.Builder

Set the subscription ID.

Public constructors

Builder

Added in API level 30
Builder()

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.

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.

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.

setSubscriptionId

Added in API level 35
fun setSubscriptionId(subId: Int): WifiInfo.Builder

Set the subscription ID.

Return
WifiInfo.Builder This value cannot be null.