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
    Discovery state: peer has not been contacted.
    static final int
    Discovery state: pairing established.
    static final int
    Discovery state: peer transitioned out of range or refused pairing.
    static final int
    Discovery state: pairing in progress.
    static final int
    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
    Stable peer identifier (MAC address on Android).
    User-visible device name (e.g. "Pixel 9").
    int
    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:
    • STATE_INVITED

      public static final int STATE_INVITED
      Discovery state: pairing in progress.
      See Also:
    • STATE_CONNECTED

      public static final int STATE_CONNECTED
      Discovery state: pairing established.
      See Also:
    • STATE_FAILED

      public static final int STATE_FAILED
      Discovery state: peer transitioned out of range or refused pairing.
      See Also:
    • STATE_UNAVAILABLE

      public static final int STATE_UNAVAILABLE
      Discovery state: peer no longer responding to discovery probes.
      See Also:
  • 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.