Code example for WifiP2pManager

Methods: discoverPeers

0
	 
	@Override 
	public void onResume(){ 
		super.onResume(); 
		registerReceiver(mReceiver,mIntentFilter);
		mManager.discoverPeers(mChannel, discoverPeersListener);
	} 
	 
	@Override 
	public void onPause(){ 
		super.onPause(); 
		unregisterReceiver(mReceiver);
	} 
	 
	WifiP2pManager.ActionListener discoverPeersListener = new WifiP2pManager.ActionListener(){
 
		@Override 
		public void onFailure(int reason) { 
			Log.e(TAG, "Discover peers failed"); 
		}