Code example for WifiP2pDeviceList

Methods: getDeviceList

0
 
   @Override 
   public void onPeersAvailable(WifiP2pDeviceList peers)
   { 
      // TODO Auto-generated method stub 
      for (WifiP2pDevice device : peers.getDeviceList())
      { 
         this.device = device;
         break; 
      } 
   } 
 
   @Override 
   public void onClick(View v)
   { 
 
      if (v == buttonConnect)
      { 
         connect(this.device);
      } 
      else if (v == buttonFind)