# Class WiFiDirectPeer

java.lang.Object
com.codename1.io.wifi.WiFiDirectPeer

public final class WiFiDirectPeer extends java.lang.Object
One peer discovered by `WiFiDirect.startDiscovery(...)`. Immutable.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `STATE_AVAILABLE`
  Discovery state: peer has not been contacted.
  `static final int`
  `STATE_CONNECTED`
  Discovery state: pairing established.
  `static final int`
  `STATE_FAILED`
  Discovery state: peer transitioned out of range or refused pairing.
  `static final int`
  `STATE_INVITED`
  Discovery state: pairing in progress.
  `static final int`
  `STATE_UNAVAILABLE`
  Discovery state: peer no longer responding to discovery probes.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WiFiDirectPeer(String deviceName, String deviceAddress, int state)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDeviceAddress()`
  Stable peer identifier (MAC address on Android).
  `String`
  `getDeviceName()`
  User-visible device name (e.g. "Pixel 9").
  `int`
  `getState()`
  One of the `STATE_*` constants.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### STATE_AVAILABLE

    public static final int STATE_AVAILABLE
    Discovery state: peer has not been contacted.
    See Also:
      - Constant Field Values

  - ### STATE_INVITED

    public static final int STATE_INVITED
    Discovery state: pairing in progress.
    See Also:
      - Constant Field Values

  - ### STATE_CONNECTED

    public static final int STATE_CONNECTED
    Discovery state: pairing established.
    See Also:
      - Constant Field Values

  - ### STATE_FAILED

    public static final int STATE_FAILED
    Discovery state: peer transitioned out of range or refused pairing.
    See Also:
      - Constant Field Values

  - ### STATE_UNAVAILABLE

    public static final int STATE_UNAVAILABLE
    Discovery state: peer no longer responding to discovery probes.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### WiFiDirectPeer

    public WiFiDirectPeer(String deviceName, String deviceAddress, int state)

- ## Method Details

  - ### getDeviceName

    public String getDeviceName()
    User-visible device name (e.g. "Pixel 9").

  - ### getDeviceAddress

    public String getDeviceAddress()
    Stable peer identifier (MAC address on Android).

  - ### getState

    public int getState()
    One of the `STATE_*` constants.