Code example for WifiManager.MulticastLock

Methods: acquire

0
		setContentView(tv);
 
		WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
		if (wifi != null) {
			MulticastLock mcLock = wifi.createMulticastLock("mylock");
			mcLock.acquire();
			// mcLock.release(); 
		} else { 
			Log.v("android-umundo", "Cannot get WifiManager");
		} 
 
//		System.loadLibrary("umundoNativeJava"); 
		System.loadLibrary("umundoNativeJava_d");
 
		node = new Node();
		fooPub = new Publisher("pingpong");
		node.addPublisher(fooPub);
		fooSub = new Subscriber("pingpong", new TestReceiver());
		node.addSubscriber(fooSub);
		testPublishing = new Thread(new TestPublishing());
		testPublishing.start();