public class WifiConfiguration extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
WifiConfiguration.AuthAlgorithm
Recognized IEEE 802.11 authentication algorithms.
|
class |
WifiConfiguration.EnterpriseField |
static class |
WifiConfiguration.GroupCipher
Recognized group ciphers.
|
static class |
WifiConfiguration.IpAssignment |
static class |
WifiConfiguration.KeyMgmt
Recognized key management schemes.
|
static class |
WifiConfiguration.PairwiseCipher
Recognized pairwise ciphers for WPA.
|
static class |
WifiConfiguration.Protocol
Recognized security protocols.
|
static class |
WifiConfiguration.ProxySettings |
static class |
WifiConfiguration.Status
Possible status of a network configuration.
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
BitSet |
allowedAuthAlgorithms
The set of authentication protocols supported by this configuration.
|
BitSet |
allowedGroupCiphers
The set of group ciphers supported by this configuration.
|
BitSet |
allowedKeyManagement
The set of key management protocols supported by this configuration.
|
BitSet |
allowedPairwiseCiphers
The set of pairwise ciphers for WPA supported by this configuration.
|
BitSet |
allowedProtocols
The set of security protocols supported by this configuration.
|
WifiConfiguration.EnterpriseField |
anonymous_identity |
String |
BSSID
When set, this network configuration entry should only be used when
associating with the AP having the specified BSSID.
|
static String |
bssidVarName |
WifiConfiguration.EnterpriseField |
ca_cert |
WifiConfiguration.EnterpriseField |
client_cert |
static Parcelable.Creator<WifiConfiguration> |
CREATOR
Implement the Parcelable interface
|
static int |
DISABLED_AUTH_FAILURE |
static int |
DISABLED_DHCP_FAILURE |
static int |
DISABLED_DNS_FAILURE |
static int |
DISABLED_UNKNOWN_REASON |
int |
disableReason
The code referring to a reason for disabling the network
Valid when
status == Status.DISABLED |
WifiConfiguration.EnterpriseField |
eap |
WifiConfiguration.EnterpriseField |
engine |
static String |
ENGINE_DISABLE
String to set the engine value to when it should be disabled.
|
static String |
ENGINE_ENABLE
String to set the engine value to when it should be enabled.
|
WifiConfiguration.EnterpriseField |
engine_id |
WifiConfiguration.EnterpriseField[] |
enterpriseFields |
boolean |
hiddenSSID
This is a network that does not broadcast its SSID, so an
SSID-specific probe request must be used for scans.
|
static String |
hiddenSSIDVarName |
WifiConfiguration.EnterpriseField |
identity |
static int |
INVALID_NETWORK_ID |
WifiConfiguration.IpAssignment |
ipAssignment |
WifiConfiguration.EnterpriseField |
key_id |
static String |
KEYSTORE_ENGINE_ID
String representing the keystore OpenSSL ENGINE's ID.
|
static String |
KEYSTORE_URI
String representing the keystore URI used for wpa_supplicant.
|
LinkProperties |
linkProperties |
int |
networkId
The ID number that the supplicant uses to identify this
network configuration entry.
|
static String |
OLD_PRIVATE_KEY_NAME
In old configurations, the "private_key" field was used.
|
WifiConfiguration.EnterpriseField |
password |
WifiConfiguration.EnterpriseField |
phase2 |
String |
preSharedKey
Pre-shared key for use with WPA-PSK.
|
int |
priority
Priority determines the preference given to a network by
wpa_supplicant
when choosing an access point with which to associate. |
static String |
priorityVarName |
WifiConfiguration.ProxySettings |
proxySettings |
static String |
pskVarName |
String |
SSID
The network's SSID.
|
static String |
ssidVarName |
int |
status
The current status of this network configuration entry.
|
String[] |
wepKeys
Up to four WEP keys.
|
static String[] |
wepKeyVarNames |
static String |
wepTxKeyIdxVarName |
int |
wepTxKeyIndex
Default WEP key index, ranging from 0 to 3.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
WifiConfiguration() |
WifiConfiguration(WifiConfiguration source)
copy constructor
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Implement the Parcelable interface
|
int |
getAuthType() |
String |
getPrintableSsid() |
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
void |
writeToParcel(Parcel dest,
int flags)
Implement the Parcelable interface
|
public static final String OLD_PRIVATE_KEY_NAME
public static final String KEYSTORE_ENGINE_ID
public static final String KEYSTORE_URI
public static final String ENGINE_ENABLE
public static final String ENGINE_DISABLE
public static final String ssidVarName
public static final String bssidVarName
public static final String pskVarName
public static final String[] wepKeyVarNames
public static final String wepTxKeyIdxVarName
public static final String priorityVarName
public static final String hiddenSSIDVarName
public static final int INVALID_NETWORK_ID
public WifiConfiguration.EnterpriseField eap
public WifiConfiguration.EnterpriseField phase2
public WifiConfiguration.EnterpriseField identity
public WifiConfiguration.EnterpriseField anonymous_identity
public WifiConfiguration.EnterpriseField password
public WifiConfiguration.EnterpriseField client_cert
public WifiConfiguration.EnterpriseField engine
public WifiConfiguration.EnterpriseField engine_id
public WifiConfiguration.EnterpriseField key_id
public WifiConfiguration.EnterpriseField ca_cert
public WifiConfiguration.EnterpriseField[] enterpriseFields
public static final int DISABLED_UNKNOWN_REASON
public static final int DISABLED_DNS_FAILURE
public static final int DISABLED_DHCP_FAILURE
public static final int DISABLED_AUTH_FAILURE
public int networkId
public int status
WifiConfiguration.Status
public int disableReason
status
== Status.DISABLEDpublic String SSID
"MyNetwork"
, or a string of
hex digits,which are not enclosed in quotes
(e.g., 01a243f405
).public String BSSID
XX:XX:XX:XX:XX:XX
where each X
is a hex digit.public String preSharedKey
public String[] wepKeys
"abcdef"
or a string
of hex digits (e.g., 0102030405
).
When the value of one of these keys is read, the actual key is
not returned, just a "*" if the key has a value, or the null
string otherwise.public int wepTxKeyIndex
public int priority
wpa_supplicant
when choosing an access point with which to associate.public boolean hiddenSSID
public BitSet allowedKeyManagement
WifiConfiguration.KeyMgmt
for descriptions of the values.
Defaults to WPA-PSK WPA-EAP.public BitSet allowedProtocols
WifiConfiguration.Protocol
for descriptions of the values.
Defaults to WPA RSN.public BitSet allowedAuthAlgorithms
WifiConfiguration.AuthAlgorithm
for descriptions of the values.
Defaults to automatic selection.public BitSet allowedPairwiseCiphers
WifiConfiguration.PairwiseCipher
for descriptions of the values.
Defaults to CCMP TKIP.public BitSet allowedGroupCiphers
WifiConfiguration.GroupCipher
for descriptions of the values.
Defaults to CCMP TKIP WEP104 WEP40.public WifiConfiguration.IpAssignment ipAssignment
public WifiConfiguration.ProxySettings proxySettings
public LinkProperties linkProperties
public static final Parcelable.Creator<WifiConfiguration> CREATOR
public WifiConfiguration()
public WifiConfiguration(WifiConfiguration source)
public String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
public String getPrintableSsid()
public int getAuthType()
public int describeContents()
describeContents
in interface Parcelable
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
.