Code example for WifiManager

Methods: createMulticastLock

0
		return WifiUtils.aquireMulticastLock(pContext, WifiUtils.MULTICASTLOCK_NAME_DEFAULT);
	} 
 
	public static MulticastLock aquireMulticastLock(final Context pContext, final String pMulticastLockName) {
		final WifiManager wifiManager = WifiUtils.getWifiManager(pContext);
		final MulticastLock multicastLock = wifiManager.createMulticastLock(pMulticastLockName);
		multicastLock.setReferenceCounted(true);
		multicastLock.acquire();
		return multicastLock;
	} 
 
	public static void releaseMulticastLock(final MulticastLock pMulticastLock) {
		if (pMulticastLock.isHeld()) {
			pMulticastLock.release();
		} 
	} 
 
 
	public static byte[] getBroadcastIPAddressRaw(final Context pContext) throws WifiException {
		final WifiManager wifiManager = WifiUtils.getWifiManager(pContext);
		final DhcpInfo dhcp = wifiManager.getDhcpInfo();