public class ScanResult extends Object implements Parcelable
quality
, noise
, and maxbitrate
attributes,
but does not currently report them to external clients.Modifier and Type | Class and Description |
---|---|
static class |
ScanResult.InformationElement
information elements from beacon
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
int |
anqpDomainId
The ANQP Domain ID from the Hotspot 2.0 Indication element, if present.
|
AnqpInformationElement[] |
anqpElements
ANQP response elements.
|
List<String> |
anqpLines |
long |
blackListTimestamp |
String |
BSSID
The address of the access point.
|
byte[] |
bytes |
String |
capabilities
Describes the authentication, key management, and encryption schemes
supported by the access point.
|
int |
centerFreq0
Not used if the AP bandwidth is 20 MHz
If the AP use 40, 80 or 160 MHz, this is the center frequency (in MHz)
if the AP use 80 + 80 MHz, this is the center frequency of the first segment (in MHz)
|
int |
centerFreq1
Only used if the AP bandwidth is 80 + 80 MHz
if the AP use 80 + 80 MHz, this is the center frequency of the second segment (in MHz)
|
static int |
CHANNEL_WIDTH_160MHZ
AP Channel bandwidth is 160 MHZ
|
static int |
CHANNEL_WIDTH_20MHZ
AP Channel bandwidth is 20 MHZ
|
static int |
CHANNEL_WIDTH_40MHZ
AP Channel bandwidth is 40 MHZ
|
static int |
CHANNEL_WIDTH_80MHZ
AP Channel bandwidth is 80 MHZ
|
static int |
CHANNEL_WIDTH_80MHZ_PLUS_MHZ
AP Channel bandwidth is 160 MHZ, but 80MHZ + 80MHZ
|
int |
channelWidth
AP Channel bandwidth; one of
CHANNEL_WIDTH_20MHZ , CHANNEL_WIDTH_40MHZ ,
CHANNEL_WIDTH_80MHZ , CHANNEL_WIDTH_160MHZ
or CHANNEL_WIDTH_80MHZ_PLUS_MHZ . |
static Parcelable.Creator<ScanResult> |
CREATOR
Implement the Parcelable interface
|
int |
distanceCm
The approximate distance to the AP in centimeter, if available.
|
int |
distanceSdCm
The standard deviation of the distance to the access point, if available.
|
static long |
FLAG_80211mc_RESPONDER |
static long |
FLAG_PASSPOINT_NETWORK |
long |
flags
Defines flags; such as
FLAG_PASSPOINT_NETWORK . |
int |
frequency
The primary 20 MHz frequency (in MHz) of the channel over which the client is communicating
with the access point.
|
long |
hessid
The HESSID from the beacon.
|
ScanResult.InformationElement[] |
informationElements
information elements found in the beacon
|
boolean |
is80211McRTTResponder
Deprecated.
use is80211mcResponder() instead
|
int |
isAutoJoinCandidate
If the scan result is a valid autojoin candidate
|
int |
level
The detected signal level in dBm, also known as the RSSI.
|
int |
numConnection
Number of time we connected to it
|
int |
numIpConfigFailures
num IP configuration failures
|
int |
numUsage
Number of time autojoin used it
|
CharSequence |
operatorFriendlyName
Indicates passpoint operator name published by access point.
|
long |
seen
Timestamp representing date when this result was last seen, in milliseconds from 1970
|
String |
SSID
The network name.
|
long |
timestamp
timestamp in microseconds (since boot) when
this result was last seen.
|
static int |
UNSPECIFIED |
boolean |
untrusted
Status: indicating the scan result is not a result
that is part of user's saved configurations
|
CharSequence |
venueName
Indicates venue name (such as 'San Francisco Airport') published by access point; only
available on passpoint network and if published by access point.
|
WifiSsid |
wifiSsid
Ascii encoded SSID.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
ScanResult()
empty scan result
|
ScanResult(ScanResult source)
copy constructor
|
ScanResult(String Ssid,
String BSSID,
long hessid,
int anqpDomainId,
String caps,
int level,
int frequency,
long tsf,
int distCm,
int distSdCm,
int channelWidth,
int centerFreq0,
int centerFreq1,
boolean is80211McRTTResponder) |
ScanResult(WifiSsid wifiSsid,
String BSSID,
long hessid,
int anqpDomainId,
byte[] osuProviders,
String caps,
int level,
int frequency,
long tsf) |
ScanResult(WifiSsid wifiSsid,
String BSSID,
String caps,
int level,
int frequency,
long tsf,
int distCm,
int distSdCm) |
ScanResult(WifiSsid wifiSsid,
String Ssid,
String BSSID,
long hessid,
int anqpDomainId,
String caps,
int level,
int frequency,
long tsf,
int distCm,
int distSdCm,
int channelWidth,
int centerFreq0,
int centerFreq1,
boolean is80211McRTTResponder) |
Modifier and Type | Method and Description |
---|---|
void |
averageRssi(int previousRssi,
long previousSeen,
int maxAge) |
void |
clearFlag(long flag)
clears a flag in
flags field |
int |
describeContents()
Implement the Parcelable interface
|
boolean |
is24GHz() |
static boolean |
is24GHz(int freq) |
boolean |
is5GHz() |
static boolean |
is5GHz(int freq) |
boolean |
is80211mcResponder() |
boolean |
isPasspointNetwork() |
void |
setFlag(long flag)
sets a flag in
flags field |
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel dest,
int flags)
Implement the Parcelable interface
|
public String SSID
public WifiSsid wifiSsid
public String BSSID
public long hessid
public int anqpDomainId
public String capabilities
public int level
Use WifiManager.calculateSignalLevel(int, int)
to convert this number into
an absolute signal level which can be displayed to a user.
public int frequency
public static final int CHANNEL_WIDTH_20MHZ
public static final int CHANNEL_WIDTH_40MHZ
public static final int CHANNEL_WIDTH_80MHZ
public static final int CHANNEL_WIDTH_160MHZ
public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ
public int channelWidth
CHANNEL_WIDTH_20MHZ
, CHANNEL_WIDTH_40MHZ
,
CHANNEL_WIDTH_80MHZ
, CHANNEL_WIDTH_160MHZ
or CHANNEL_WIDTH_80MHZ_PLUS_MHZ
.public int centerFreq0
public int centerFreq1
public boolean is80211McRTTResponder
public long timestamp
public long seen
public int isAutoJoinCandidate
public int numIpConfigFailures
public long blackListTimestamp
public boolean untrusted
public int numConnection
public int numUsage
public int distanceCm
UNSPECIFIED
.
public int distanceSdCm
UNSPECIFIED
.
public static final long FLAG_PASSPOINT_NETWORK
public static final long FLAG_80211mc_RESPONDER
public long flags
FLAG_PASSPOINT_NETWORK
.
public CharSequence venueName
public CharSequence operatorFriendlyName
public static final int UNSPECIFIED
public byte[] bytes
public ScanResult.InformationElement[] informationElements
public AnqpInformationElement[] anqpElements
public static final Parcelable.Creator<ScanResult> CREATOR
public ScanResult(WifiSsid wifiSsid, String BSSID, long hessid, int anqpDomainId, byte[] osuProviders, String caps, int level, int frequency, long tsf)
public ScanResult(WifiSsid wifiSsid, String BSSID, String caps, int level, int frequency, long tsf, int distCm, int distSdCm)
public ScanResult(String Ssid, String BSSID, long hessid, int anqpDomainId, String caps, int level, int frequency, long tsf, int distCm, int distSdCm, int channelWidth, int centerFreq0, int centerFreq1, boolean is80211McRTTResponder)
public ScanResult(WifiSsid wifiSsid, String Ssid, String BSSID, long hessid, int anqpDomainId, String caps, int level, int frequency, long tsf, int distCm, int distSdCm, int channelWidth, int centerFreq0, int centerFreq1, boolean is80211McRTTResponder)
public ScanResult(ScanResult source)
public ScanResult()
public void averageRssi(int previousRssi, long previousSeen, int maxAge)
previousRssi
- previousSeen
- maxAge
- public void setFlag(long flag)
flags
fieldflag
- flag to setpublic void clearFlag(long flag)
flags
fieldflag
- flag to setpublic boolean is80211mcResponder()
public boolean isPasspointNetwork()
public boolean is24GHz()
public static boolean is24GHz(int freq)
public boolean is5GHz()
public static boolean is5GHz(int freq)
public String toString()
Object
toString
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())
public int describeContents()
describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
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
.