Code example for WifiP2pManager

Methods: connect

0
		ListView list = (ListView) arg0;
		WifiP2pDevice device = (WifiP2pDevice) list.getItemAtPosition(position);
		WifiP2pConfig config = new WifiP2pConfig();
		config.deviceAddress = device.deviceAddress;
 
		manager.connect(mChannel, config, new ActionListener() {
 
			@Override 
			public void onFailure(int arg0) {
				Log.d("director", "connect failed");
 
			} 
 
			@Override 
			public void onSuccess() { 
				Log.d("director", "connect success ");
 
			} 
 
		});