public interface WiFiDirectListener
Listener for WiFi Direct peer discovery. Methods fire on the EDT.
Methods
public abstract void onPeersAvailable(WiFiDirectPeer[] peers) | Fired whenever the platform reports a new snapshot of the peer list. |
public abstract void onDiscoveryError(Throwable error) | Fired when discovery itself fails (e.g. WiFi is off). |
Method details
onPeersAvailable
public abstract void onPeersAvailable(WiFiDirectPeer[] peers)Fired whenever the platform reports a new snapshot of the peer list.
The array is sorted by signal strength when the platform supplies it,
otherwise by discovery order.
onDiscoveryError
public abstract void onDiscoveryError(Throwable error)Fired when discovery itself fails (e.g. WiFi is off).