您的位置:首页 > 移动开发 > Android开发

Android学习笔记三十三:ScanResult(示例,出错代码)

2016-05-20 08:58 465 查看
出处:http://www.apihome.cn/api/android/ScanResult.html


android.net.wifi

类 ScanResult

java.lang.Object


android.net.wifi.ScanResult


所有已实现的接口:Parcelable

public class ScanResultextends Objectimplements Parcelable


Describes information about a detected access point. In addition to the attributes described here, the supplicant keeps track of
quality
,
noise
, and
maxbitrate
attributes, but does not currently report them to external
clients.

嵌套类摘要
从接口 android.os.Parcelable 继承的嵌套类/接口
Parcelable.Creator<T>
字段摘要
String
BSSID


The address of the access point.
String
capabilities


Describes the authentication, key management, and encryption schemes supported by the access point.
static Parcelable.Creator<ScanResult>
CREATOR


Implement the Parcelableinterface
int
frequency


The frequency in MHz of the channel over which the client is communicating with the access point.
int
level


The detected signal level in dBm.
String
SSID


The network name.
从接口 android.os.Parcelable 继承的字段
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
构造方法摘要
ScanResult(String SSID,String BSSID,String caps,int level,int frequency)


We'd like to obtain the following attributes, but they are not reported via the socketinterface, even though they are knowninternally by wpa_supplicant.
方法摘要
int
describeContents()


Implement the Parcelableinterface
String
toString()


Returns a string containing a concise, human-readable description of this object.
void
writeToParcel(Parcel dest,int flags)


Implement the Parcelableinterface
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
字段详细信息

SSID

publicString SSID


The network name.

BSSID

publicString BSSID


The address of the access point.

capabilities

publicString capabilities


Describes the authentication, key management, and encryption schemes supported by the access point.

level

publicint level


The detected signal level in dBm. At least those are the units used by the TI driver.

frequency

publicint frequency


The frequency in MHz of the channel over which the client is communicating with the access point.

CREATOR

public static final Parcelable.Creator<ScanResult> CREATOR


Implement the Parcelableinterface

构造方法详细信息

ScanResult

public ScanResult(String SSID,
String BSSID,
String caps,
int level,
int frequency)


We'd like to obtain the following attributes, but they are not reported via the socketinterface, even though they are knowninternally by wpa_supplicant.

方法详细信息

toString

publicString toString()


从类
Object
复制的描述Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takesinto account the object's type
and data. The default implementation simply concatenates the class name, the '@' sign and a hexadecimal representation of the object's Object.hashCode(), that is, it is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())


覆盖:类
Object
中的
toString


返回:a printable representation of this object.

describeContents

publicint describeContents()


Implement the Parcelableinterface

指定者:接口
Parcelable
中的
describeContents


返回:a bitmask indicating the set of special object types marshalled by the Parcelable.

writeToParcel

publicvoid writeToParcel(Parcel dest,
int flags)


Implement the Parcelableinterface

指定者:接口
Parcelable
中的
writeToParcel


参数:
dest
- The Parcel in which the object should be written.
flags
- Additional flags about how the object should be written.May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: