Code example for WifiP2pManager

Methods: requestPeers

		public void onSuccess() { 
			Log.i(TAG, "Discover peers successful. Looking for peers"); 
			mManager.requestPeers(mChannel, getPeersListListener); 
	WifiP2pManager.PeerListListener getPeersListListener = new WifiP2pManager.PeerListListener(){
		public void onPeersAvailable(WifiP2pDeviceList peers) { 
			if(peers.getDeviceList().size() <=0){ 
				Log.i(TAG, "No peers found"); 
			Iterator<WifiP2pDevice> i = peers.getDeviceList().iterator(); 
				WifiP2pDevice device =; 
				WifiP2pConfig config = new WifiP2pConfig(); 
Connect your IDE to all the code out there  Get Codota for Java