WifiInfo.Builder


public static final class WifiInfo.Builder
extends Object

java.lang.Object
   ↳ android.net.wifi.WifiInfo.Builder


Builder for WifiInfo

Summary

Public constructors

Builder()

Public methods

WifiInfo build()

Build a WifiInfo object.

WifiInfo.Builder setBssid(String bssid)

Set the BSSID.

WifiInfo.Builder setCurrentSecurityType(int securityType)

Set the current security type

WifiInfo.Builder setNetworkId(int networkId)

Set the network ID.

WifiInfo.Builder setRssi(int rssi)

Set the RSSI, in dBm.

WifiInfo.Builder setSsid(byte[] ssid)

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

WifiInfo.Builder setSubscriptionId(int subId)

Set the subscription ID.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in API level 30
public Builder ()

Public methods

build

Added in API level 30
public WifiInfo build ()

Build a WifiInfo object.

Returns
WifiInfo This value cannot be null.

setBssid

Added in API level 30
public WifiInfo.Builder setBssid (String bssid)

Set the BSSID.

Parameters
bssid String: This value cannot be null.

Returns
WifiInfo.Builder This value cannot be null.

setCurrentSecurityType

Added in API level 31
public WifiInfo.Builder setCurrentSecurityType (int securityType)

Set the current security type

Returns
WifiInfo.Builder This value cannot be null.

setNetworkId

Added in API level 30
public WifiInfo.Builder setNetworkId (int networkId)

Set the network ID.

Parameters
networkId int

Returns
WifiInfo.Builder This value cannot be null.

setRssi

Added in API level 30
public WifiInfo.Builder setRssi (int rssi)

Set the RSSI, in dBm.

Parameters
rssi int

Returns
WifiInfo.Builder This value cannot be null.

See also:

setSsid

Added in API level 30
public WifiInfo.Builder setSsid (byte[] ssid)

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

Parameters
ssid byte: This value cannot be null.

Returns
WifiInfo.Builder This value cannot be null.

See also:

setSubscriptionId

Added in API level 35
public WifiInfo.Builder setSubscriptionId (int subId)

Set the subscription ID.

Parameters
subId int

Returns
WifiInfo.Builder This value cannot be null.