Code example for WifiP2pManager

Methods: requestConnectionInfo

0
 
            if (networkInfo.isConnected()) {
 
                // we are connected with the other device, request connection 
                // info to find group owner IP 
                mP2pManager.requestConnectionInfo(mChannel, (ConnectionInfoListener) mService);
            } else { 
                // It's a disconnect 
            } 
        } else if (WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION
                .equals(action)) {
 
            final WifiP2pDevice device = (WifiP2pDevice) intent
                    .getParcelableExtra(WifiP2pManager.EXTRA_WIFI_P2P_DEVICE);
            Log.d(TAG, "Device status -" + device.status);
 
        } 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java