Code example for WifiP2pManager

Methods: requestPeers

0
		} 
 
		@Override 
		public void onSuccess() { 
			Log.i(TAG, "Discover peers successful. Looking for peers"); 
			mManager.requestPeers(mChannel, getPeersListListener); 
		}	 
	}; 
	 
	WifiP2pManager.PeerListListener getPeersListListener = new WifiP2pManager.PeerListListener(){
		@Override 
		public void onPeersAvailable(WifiP2pDeviceList peers) { 
			if(peers.getDeviceList().size() <=0){ 
				Log.i(TAG, "No peers found"); 
			} 
			 
			Iterator<WifiP2pDevice> i = peers.getDeviceList().iterator(); 
			while(i.hasNext()){ 
				WifiP2pDevice device = i.next(); 
				WifiP2pConfig config = new WifiP2pConfig(); 
				config.deviceAddress = device.deviceAddress;