Code example for WifiManager.MulticastLock

Methods: acquire, setReferenceCounted

		// Acquiring multicast lock this is needed on android to receive Wifi 
		// Multicasts packets 
		// these packets is how services are discovered on the network 
		WifiManager wifi = (WifiManager) getSystemService(android.content.Context.WIFI_SERVICE);
		mLock = wifi.createMulticastLock("mylockthereturn");
		// Must create the Jmdns object after acquiring lock 
		// Adding this class as a service listener 
		try { 
			mJmdns = JmDNS.create();
			mJmdns.addServiceListener(LIVECAP_SERVICE_TYPE, this);
		} catch (IOException e) {
			Log.e("Perception Search", "Error creating the JmDNS object.");
	 * This method is called when a service has been found. This method adds the 
	 * name of the service to the list. It uses a utility called runOnUiThread()