Code example for WifiP2pConfig

	 * be invoked when the connection is established. 
	 * @param peer the peer device to connect to. 
	public void connectToPeer(WifiP2pDevice peer) {
		WifiP2pConfig config = new WifiP2pConfig();
		config.deviceAddress = peer.deviceAddress;
		config.wps.setup = WpsInfo.PBC;
		mManager.connect(mChannel, config, new ActionListener() {
			public void onSuccess() { 
				// Let WifiBroadcastReceiver notify us. Ignore it here. 
			public void onFailure(int reason) {
				// TODO: notify someone. 
Stop searching for code, let great code find you!  Add Codota to your java IDE