Code example for WifiP2pConfig

	public void onItemClick(AdapterView<?> arg0, View view, int position,
			long arg3) {
		ListView list = (ListView) arg0;
		WifiP2pDevice device = (WifiP2pDevice) list.getItemAtPosition(position);
		WifiP2pConfig config = new WifiP2pConfig();
		config.deviceAddress = device.deviceAddress;
		manager.connect(mChannel, config, new ActionListener() {
			public void onFailure(int arg0) {
				Log.d("director", "connect failed");
			public void onSuccess() { 
				Log.d("director", "connect success ");
Connect your IDE to all the code out there  Get Codota for Java