Skip to content

Most visited

Recently visited

navigation
Added in API level 1

WifiConfiguration

public class WifiConfiguration
extends Object implements Parcelable

java.lang.Object
   ↳ android.net.wifi.WifiConfiguration


A class representing a configured Wi-Fi network, including the security configuration.

Summary

Nested classes

class WifiConfiguration.AuthAlgorithm

Recognized IEEE 802.11 authentication algorithms. 

class WifiConfiguration.GroupCipher

Recognized group ciphers. 

class WifiConfiguration.KeyMgmt

Recognized key management schemes. 

class WifiConfiguration.PairwiseCipher

Recognized pairwise ciphers for WPA. 

class WifiConfiguration.Protocol

Recognized security protocols. 

class WifiConfiguration.Status

Possible status of a network configuration. 

Inherited constants

From interface android.os.Parcelable

Fields

public String BSSID

When set, this network configuration entry should only be used when associating with the AP having the specified BSSID.

public String FQDN

Fully qualified domain name of a passpoint configuration

public String SSID

The network's SSID.

public BitSet allowedAuthAlgorithms

The set of authentication protocols supported by this configuration.

public BitSet allowedGroupCiphers

The set of group ciphers supported by this configuration.

public BitSet allowedKeyManagement

The set of key management protocols supported by this configuration.

public BitSet allowedPairwiseCiphers

The set of pairwise ciphers for WPA supported by this configuration.

public BitSet allowedProtocols

The set of security protocols supported by this configuration.

public WifiEnterpriseConfig enterpriseConfig

The enterprise configuration details specifying the EAP method, certificates and other settings associated with the EAP.

public boolean hiddenSSID

This is a network that does not broadcast its SSID, so an SSID-specific probe request must be used for scans.

public int networkId

The ID number that the supplicant uses to identify this network configuration entry.

public String preSharedKey

Pre-shared key for use with WPA-PSK.

public int priority

Priority determines the preference given to a network by wpa_supplicant when choosing an access point with which to associate.

public String providerFriendlyName

Name of passpoint credential provider

public long[] roamingConsortiumIds

Roaming Consortium Id list for passpoint credential; identifies a set of networks where passpoint credential will be considered valid

public int status

The current status of this network configuration entry.

public String[] wepKeys

Up to four WEP keys.

public int wepTxKeyIndex

Default WEP key index, ranging from 0 to 3.

Public constructors

WifiConfiguration()

Public methods

boolean isPasspoint()

Identify if this configuration represents a passpoint network

String toString()

Returns a string representation of the object.

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Fields

BSSID

Added in API level 1
String BSSID

When set, this network configuration entry should only be used when associating with the AP having the specified BSSID. The value is a string in the format of an Ethernet MAC address, e.g., XX:XX:XX:XX:XX:XX where each X is a hex digit.

FQDN

Added in API level 21
String FQDN

Fully qualified domain name of a passpoint configuration

SSID

Added in API level 1
String SSID

The network's SSID. Can either be an ASCII string, which must be enclosed in double quotation marks (e.g., "MyNetwork", or a string of hex digits,which are not enclosed in quotes (e.g., 01a243f405).

allowedAuthAlgorithms

Added in API level 1
BitSet allowedAuthAlgorithms

The set of authentication protocols supported by this configuration. See WifiConfiguration.AuthAlgorithm for descriptions of the values. Defaults to automatic selection.

allowedGroupCiphers

Added in API level 1
BitSet allowedGroupCiphers

The set of group ciphers supported by this configuration. See WifiConfiguration.GroupCipher for descriptions of the values. Defaults to CCMP TKIP WEP104 WEP40.

allowedKeyManagement

Added in API level 1
BitSet allowedKeyManagement

The set of key management protocols supported by this configuration. See WifiConfiguration.KeyMgmt for descriptions of the values. Defaults to WPA-PSK WPA-EAP.

allowedPairwiseCiphers

Added in API level 1
BitSet allowedPairwiseCiphers

The set of pairwise ciphers for WPA supported by this configuration. See WifiConfiguration.PairwiseCipher for descriptions of the values. Defaults to CCMP TKIP.

allowedProtocols

Added in API level 1
BitSet allowedProtocols

The set of security protocols supported by this configuration. See WifiConfiguration.Protocol for descriptions of the values. Defaults to WPA RSN.

enterpriseConfig

Added in API level 18
WifiEnterpriseConfig enterpriseConfig

The enterprise configuration details specifying the EAP method, certificates and other settings associated with the EAP.

hiddenSSID

Added in API level 1
boolean hiddenSSID

This is a network that does not broadcast its SSID, so an SSID-specific probe request must be used for scans.

networkId

Added in API level 1
int networkId

The ID number that the supplicant uses to identify this network configuration entry. This must be passed as an argument to most calls into the supplicant.

preSharedKey

Added in API level 1
String preSharedKey

Pre-shared key for use with WPA-PSK.

When the value of this key is read, the actual key is not returned, just a "*" if the key has a value, or the null string otherwise.

priority

Added in API level 1
int priority

Priority determines the preference given to a network by wpa_supplicant when choosing an access point with which to associate.

providerFriendlyName

Added in API level 23
String providerFriendlyName

Name of passpoint credential provider

roamingConsortiumIds

Added in API level 23
long[] roamingConsortiumIds

Roaming Consortium Id list for passpoint credential; identifies a set of networks where passpoint credential will be considered valid

status

Added in API level 1
int status

The current status of this network configuration entry. Fixme We need remove this field to use only Quality network selection status only

See also:

wepKeys

Added in API level 1
String[] wepKeys

Up to four WEP keys. Either an ASCII string enclosed in double quotation marks (e.g., "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.

wepTxKeyIndex

Added in API level 1
int wepTxKeyIndex

Default WEP key index, ranging from 0 to 3.

Public constructors

WifiConfiguration

Added in API level 1
WifiConfiguration ()

Public methods

isPasspoint

Added in API level 23
boolean isPasspoint ()

Identify if this configuration represents a passpoint network

Returns
boolean

toString

Added in API level 1
String toString ()

Returns a string representation of the object. In general, the 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())
 

Returns
String a string representation of the object.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.