Code example for WifiP2pManager

Methods: cancelConnectremoveGroup

0
		mWifiP2pManager.stopPeerDiscovery(channel, null);
	} 
 
	public void stopConnect() { 
		try { 
			mWifiP2pManager.cancelConnect(channel, null);
			mWifiP2pManager.removeGroup(channel, null);
		} catch (Exception e) {
			Log.e(TAG, "stopConnect()" + e);
		} 
	} 
 
	public void registerObserver(ManagerP2pDeivce notify) {
		observerList.add(notify);
	} 
 
	public void unRegisterObserver(ManagerP2pDeivce notify) {
		observerList.remove(notify);
	} 
 
Contextual code suggestions in your IDE  Get Codota for Java