Code example for WifiP2pManager

Methods: stopPeerDiscovery

0
		discover(); 
	} 
 
	@SuppressLint({ "NewApi", "NewApi" }) 
	public void stopSearch() { 
		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);
	} 
Contextual code suggestions in your IDE  Get Codota for Java