Search code examples
androidandroid-wifinet.p2pwifi-direct

Get notified when a client connect to a WifiP2p group


Is there any to way get a notification through a BroadcastReceiver when a client connects itself to a WifiP2p group created via createGroup(..) ?

Sounds like the

    - WIFI_P2P_STATE_CHANGED_ACTION
    - WIFI_P2P_PEERS_CHANGED_ACTION
    - WIFI_P2P_CONNECTION_CHANGED_ACTION and 
    - WIFI_P2P_THIS_DEVICE_CHANGED_ACTION

don't handle this.

Thank you. Fab


Solution

  • From my own tests with createGroup(), I can tell that WIFI_P2P_PEERS_CHANGED_ACTION is actually notified when a client connects or disconnects.