# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Enums | Inherited Constants | Methods | Inherited Methods

# SupplicantState

`public final enum SupplicantState`
`` `extends Enum<SupplicantState>` `implements Parcelable`

java.lang.Object
↳ | java.lang.Enum<android.net.wifi.SupplicantState>
| ↳ | android.net.wifi.SupplicantState

From `defs.h` in `wpa_supplicant`.

These enumeration values are used to indicate the current wpa_supplicant state. This is more fine-grained than most users will be interested in. In general, it is better to use `NetworkInfo.State`.

Note, the order of these enum constants must match the numerical values of the state constants in `defs.h` in `wpa_supplicant`.

## Summary

### Enum values
`SupplicantState` | `ASSOCIATED` Association completed.
`SupplicantState` | `ASSOCIATING` Trying to associate with a BSS/SSID.
`SupplicantState` | `AUTHENTICATING` Trying to authenticate with a BSS/SSID This state is entered when wpa_supplicant has found a suitable BSS to authenticate with and the driver is configured to try to authenticate with this BSS.
`SupplicantState` | `COMPLETED` All authentication completed.
`SupplicantState` | `DISCONNECTED` This state indicates that client is not associated, but is likely to start looking for an access point.
`SupplicantState` | `DORMANT` An Android-added state that is reported when a client issues an explicit DISCONNECT command.
`SupplicantState` | `FOUR_WAY_HANDSHAKE` WPA 4-Way Key Handshake in progress.
`SupplicantState` | `GROUP_HANDSHAKE` WPA Group Key Handshake in progress.
`SupplicantState` | `INACTIVE` Inactive state (wpa_supplicant disabled).
`SupplicantState` | `INTERFACE_DISABLED` Interface is disabled This state is entered if the network interface is disabled.
`SupplicantState` | `INVALID` A pseudo-state that should normally never be seen.
`SupplicantState` | `SCANNING` Scanning for a network.
`SupplicantState` | `UNINITIALIZED` No connection to wpa_supplicant.

### Inherited constants
From interface `android.os.Parcelable`
`int` | `CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` | `PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `writeToParcel(Parcel, int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

### Public methods
`static boolean` | `isValidState(SupplicantState state)` Returns `true` if the supplicant state is valid and `false` otherwise.
`static SupplicantState` | `valueOf(String name)`
`static final SupplicantState[]` | `values()`

### Inherited methods
From class `java.lang.Enum`
`final Object` | `clone()` Throws CloneNotSupportedException.
`final int` | `compareTo(SupplicantState o)` Compares this enum with the specified object for order.
`final boolean` | `equals(Object other)` Returns true if the specified object is equal to this enum constant.
`final void` | `finalize()` enum classes cannot have finalize methods.
`final Class<SupplicantState>` | `getDeclaringClass()` Returns the Class object corresponding to this enum constant's enum type.
`final int` | `hashCode()` Returns a hash code for this enum constant.
`final String` | `name()` Returns the name of this enum constant, exactly as declared in its enum declaration.
`final int` | `ordinal()` Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
`String` | `toString()` Returns the name of this enum constant, as contained in the declaration.
`static <T extends Enum<T>> T` | `valueOf(Class<T> enumType, String name)` Returns the enum constant of the specified enum type with the specified name.
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.
From interface `java.lang.Comparable`
`abstract int` | `compareTo(SupplicantState o)` Compares this object with the specified object for order.
From interface `android.os.Parcelable`
`abstract int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`abstract void` | `writeToParcel(Parcel dest, int flags)` Flatten this object in to a Parcel.

## Enum values

### ASSOCIATED

    public static final SupplicantState ASSOCIATED

Association completed.

This state is entered when the driver reports that association has been successfully completed with an AP. If IEEE 802.1X is used (with or without WPA/WPA2), wpa_supplicant remains in this state until the IEEE 802.1X/EAPOL authentication has been completed.

### ASSOCIATING

    public static final SupplicantState ASSOCIATING

Trying to associate with a BSS/SSID.

This state is entered when wpa_supplicant has found a suitable BSS to associate with and the driver is configured to try to associate with this BSS in ap_scan=1 mode. When using ap_scan=2 mode, this state is entered when the driver is configured to try to associate with a network using the configured SSID and security policy.

### AUTHENTICATING

    public static final SupplicantState AUTHENTICATING

Trying to authenticate with a BSS/SSID

This state is entered when wpa_supplicant has found a suitable BSS to authenticate with and the driver is configured to try to authenticate with this BSS.

### COMPLETED

    public static final SupplicantState COMPLETED

All authentication completed.

This state is entered when the full authentication process is completed. In case of WPA2, this happens when the 4-Way Handshake is successfully completed. With WPA, this state is entered after the Group Key Handshake; with IEEE 802.1X (non-WPA) connection is completed after dynamic keys are received (or if not used, after the EAP authentication has been completed). With static WEP keys and plaintext connections, this state is entered when an association has been completed.

This state indicates that the supplicant has completed its processing for the association phase and that data connection is fully configured. Note, however, that there may not be any IP address associated with the connection yet. Typically, a DHCP request needs to be sent at this point to obtain an address.

### DISCONNECTED

    public static final SupplicantState DISCONNECTED

This state indicates that client is not associated, but is likely to start looking for an access point. This state is entered when a connection is lost.

### DORMANT

    public static final SupplicantState DORMANT

An Android-added state that is reported when a client issues an explicit DISCONNECT command. In such a case, the supplicant is not only dissociated from the current access point (as for the DISCONNECTED state above), but it also does not attempt to connect to any access point until a RECONNECT or REASSOCIATE command is issued by the client.

### FOUR_WAY_HANDSHAKE

    public static final SupplicantState FOUR_WAY_HANDSHAKE

WPA 4-Way Key Handshake in progress.

This state is entered when WPA/WPA2 4-Way Handshake is started. In case of WPA-PSK, this happens when receiving the first EAPOL-Key frame after association. In case of WPA-EAP, this state is entered when the IEEE 802.1X/EAPOL authentication has been completed.

### GROUP_HANDSHAKE

    public static final SupplicantState GROUP_HANDSHAKE

WPA Group Key Handshake in progress.

This state is entered when 4-Way Key Handshake has been completed (i.e., when the supplicant sends out message 4/4) and when Group Key rekeying is started by the AP (i.e., when supplicant receives message 1/2).

### INACTIVE

    public static final SupplicantState INACTIVE

Inactive state (wpa_supplicant disabled).

This state is entered if there are no enabled networks in the configuration. wpa_supplicant is not trying to associate with a new network and external interaction (e.g., ctrl_iface call to add or enable a network) is needed to start association.

### INTERFACE_DISABLED

    public static final SupplicantState INTERFACE_DISABLED

Interface is disabled

This state is entered if the network interface is disabled. wpa_supplicant refuses any new operations that would use the radio until the interface has been enabled.

### INVALID

    public static final SupplicantState INVALID

A pseudo-state that should normally never be seen.

### SCANNING

    public static final SupplicantState SCANNING

Scanning for a network.

This state is entered when wpa_supplicant starts scanning for a network.

### UNINITIALIZED

    public static final SupplicantState UNINITIALIZED

No connection to wpa_supplicant.

This is an additional pseudo-state to handle the case where wpa_supplicant is not running and/or we have not been able to establish a connection to it.

## Public methods

### isValidState

    public static boolean isValidState (SupplicantState state)

Returns `true` if the supplicant state is valid and `false` otherwise.

Parameters
`state` | `SupplicantState`: The supplicant state

Returns
`boolean` | `true` if the supplicant state is valid and `false` otherwise.

### valueOf

    public static SupplicantState valueOf (String name)

Parameters
`name` | `String`

Returns
`SupplicantState` |

### values

    public static final SupplicantState[] values ()

Returns
`SupplicantState[]` |

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*