Code example for WifiP2pManager

Methods: connect

	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. 
	 * Initiate peer discovery to start the discovery process. Discovery will 
Stop searching for code, let great code find you!  Add Codota to your java IDE