Code example for WifiP2pManager

Methods: discoverPeers

0
      } 
   } 
 
   public void find() 
   { 
      manager.discoverPeers(channel,  new WifiP2pManager.ActionListener()
      { 
          
         @Override 
         public void onSuccess() 
         { 
            Toast.makeText(MainActivity.this, "finding peers", Toast.LENGTH_SHORT).show();
             
         } 
          
         @Override 
         public void onFailure(int reason)
         { 
            Toast.makeText(MainActivity.this, "couldn't find peers", Toast.LENGTH_SHORT).show();
         } 
      });