Code example for WifiManager.MulticastLock

Methods: acquire

0
		super.onCreate(); 
		 
		final WifiManager wifiManager = (WifiManager)this.getSystemService(Context.WIFI_SERVICE);
		 
		this.multicastLock = wifiManager.createMulticastLock("smartlights");
		this.multicastLock.acquire();
		 
		this.driver = new TCPDriver();
		 
		try { 
			this.driver.probe();
		} catch (IOException e) {
			e.printStackTrace();
		} 
	} 
	 
	public final Driver getDriver() { 
		return this.driver;
	} 
}