Code example for WifiP2pConfig

0
	@Override 
	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() {
 
			@Override 
			public void onFailure(int arg0) {
				Log.d("director", "connect failed");
 
			} 
 
			@Override 
			public void onSuccess() { 
				Log.d("director", "connect success ");
 
Experience pair programming with AI  Get Codota for Java