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

出处:http://www.apihome.cn/api/android/ScanResult.html

android.net.wifi
类 ScanResult

java.lang.Object
  继承者 android.net.wifi.ScanResult
所有已实现的接口:
Parcelable

public class ScanResult
   
   
    
    extends Object
   
   
   
   
    
    implements Parcelable
   
   

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


嵌套类摘要
 
从接口 android.os.Parcelable 继承的嵌套类/接口
Parcelable.Creator<T>
 
字段摘要
 StringBSSID 
          The address of the access point.
 Stringcapabilities 
          Describes the authentication, key management, and encryption schemes supported by the access point.
static Parcelable.Creator<ScanResult>CREATOR 
          Implement the Parcelable interface
 intfrequency 
          The frequency in MHz of the channel over which the client is communicating with the access point.
 intlevel 
          The detected signal level in dBm.
 StringSSID 
          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 socket interface, even though they are known internally by wpa_supplicant.
 
方法摘要
 intdescribeContents() 
          Implement the Parcelable interface
 StringtoString() 
          Returns a string containing a concise, human-readable description of this object.
 voidwriteToParcel(Parcel dest, int flags) 
          Implement the Parcelable interface
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

SSID

public String SSID
The network name.


BSSID

public String BSSID
The address of the access point.


capabilities

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


level

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


frequency

public int 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 Parcelable interface

构造方法详细信息

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 socket interface, even though they are known internally by wpa_supplicant.

方法详细信息

toString

public String 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 takes into 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

public int describeContents()
Implement the Parcelable interface

指定者:
接口  Parcelable 中的  describeContents
返回:
a bitmask indicating the set of special object types marshalled by the Parcelable.

writeToParcel

public void writeToParcel(Parcel dest,
                          int flags)
Implement the Parcelable interface

指定者:
接口  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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值