WifiP2pManager clearServiceRequests - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for WifiP2pManager clearServiceRequests method.

This code example shows how to use the following methods:clearServiceRequests, stopPeerDiscovery
			isServiceRequestRegistered = true;
		} 
	} 
	 
	private void unregisterServiceRequest() { 
		wifiMgr.clearServiceRequests(channel, new TaggedActionListener("clearServiceRequest"));
		isServiceRequestRegistered = false;
	} 
	 
	private void startDiscovery() { 
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
			registerServiceRequest(); 
			wifiMgr.setDnsSdResponseListeners(channel, discoveryListener, null);
			wifiMgr.discoverServices(channel, new TaggedActionListener("discoverService"));
		} else { 
			wifiMgr.discoverPeers(channel, new TaggedActionListener("discoverPeers"));
		} 
	} 
	 
	private void stopDiscovery() { 

4
CodeRank
clearServiceRequests Method Overview
Clear all registered service discovery requests.
See Code Examples for other Android WifiP2pManager Methods: