Android学习笔记三十三:ScanResult(示例,出错代码)
2016-05-20 08:58
465 查看
出处:http://www.apihome.cn/api/android/ScanResult.html
所有已实现的接口:Parcelable
Describes information about a detected access point. In addition to the attributes described here, the supplicant keeps track of
clients.
The network name.
The address of the access point.
Describes the authentication, key management, and encryption schemes supported by the access point.
The detected signal level in dBm. At least those are the units used by the TI driver.
The frequency in MHz of the channel over which the client is communicating with the access point.
Implement the Parcelableinterface
We'd like to obtain the following attributes, but they are not reported via the socketinterface, even though they are knowninternally by wpa_supplicant.
从类
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:
覆盖:类
返回:a printable representation of this object.
Implement the Parcelableinterface
指定者:接口
返回:a bitmask indicating the set of special object types marshalled by the Parcelable.
Implement the Parcelableinterface
指定者:接口
参数:
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
maxbitrateattributes, 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.
相关文章推荐
- Android学习笔记三十二:Socket编程实现简易聊天室
- 使用U3D 实现 Android Launcher(提供源码)
- Android中handler的一点讲解
- Android 布局
- [Android Exception A] – 1-The following classes could not be instantiated
- Android 图片切割工具类
- [Android Studio 1A] – 插件
- [Android Exception 1A] -com.android.volley.NoConnectionError: java.io.InterruptedIOException
- 欧洲用户放弃Android转投iOS原因大起底
- [Android NDK/JNI-1A]-开发环境搭建
- View的测量(Android群英传)
- Android启动模式launchMode
- Think Android 的数据库用法(一)
- Android开发之获取手机SIM卡信息
- Android手机在开发调试时logcat不显示输出信息的解决办法
- Android第一课笔记
- AndroidStudio 优秀插件汇总
- 蜂窝教育Android培训:技能与薪资双收
- Android TextView与EditText 同步显示
- android开发笔记之ViewPager新手导航页(动态加载指示器)