Sequenceablepublic final class WifiLinkedInfo extends Object implements Sequenceable
The information includes the SSID, BSSID, and RSSI.
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
WifiLinkedInfo.ConnState |
Enumerates the Wi-Fi connection states.
|
Sequenceable.Producer<T>| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getBand() |
Obtains the frequency band of a Wi-Fi access point.
|
String |
getBssid() |
Obtains the BSSID of a Wi-Fi access point.
|
WifiLinkedInfo.ConnState |
getConnState() |
Obtains the state of this Wi-Fi connection.
|
int |
getFrequency() |
Obtains the frequency of a Wi-Fi access point.
|
int |
getIpAddress() |
Obtains the IP address of this Wi-Fi connection.
|
int |
getLinkSpeed() |
Obtains the speed of a Wi-Fi access point.
|
String |
getMacAddress() |
Obtains the Wi-Fi MAC address of a device.
|
int |
getRssi() |
Obtains the RSSI of a Wi-Fi access point.
|
String |
getSsid() |
Obtains the SSID of a Wi-Fi access point.
|
boolean |
isHiddenSsid() |
Checks whether the SSID of the access point (AP) of this Wi-Fi connection is hidden.
|
boolean |
isRestricted() |
Checks whether this Wi-Fi connection restricts the data volume.
|
boolean |
marshalling(Parcel out) |
Writes a
Sequenceable object into a Parcel for linked info. |
String |
toString() |
Returns a string representation of the object.
|
boolean |
unmarshalling(Parcel in) |
Restores a
Sequenceable object from a Parcel for linked info. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasFileDescriptorpublic boolean marshalling(Parcel out)
Sequenceable object into a Parcel for linked info.marshalling 在接口中 Sequenceableout - Indicates the Parcel object to which the Sequenceable
object will be written.true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
Sequenceable object from a Parcel for linked info.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object into which the Sequenceable
object has been written.true if the unmarshalling is successful; returns false otherwise.public String getBssid()
The BSSID is in XX:XX:XX:XX:XX:XX format.
If you have no permission to obtain the BSSID, 02:00:00:00:00:00 is returned.
null if no BSSID is found.public int getRssi()
The unit of RSSI is dBm.
public int getFrequency()
public String getSsid()
The SSID is in UTF-8 format.
public int getLinkSpeed()
public int getBand()
Two types of frequency bands are available: 2.4 GHz WifiEvents#BAND_WIFI_2G
and 5 GHz WifiEvents#BAND_WIFI_5G.
WifiEvents#BAND_INVALID if the frequency band is invalid.public String getMacAddress()
The MAC address is in XX:XX:XX:XX:XX:XX format.
public int getIpAddress()
public WifiLinkedInfo.ConnState getConnState()
ConnState.public boolean isHiddenSsid()
true if the SSID is hidden; returns false otherwise.public boolean isRestricted()
true if this Wi-Fi connection restricts the data volume;
returns false otherwise.public String toString()
ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())