Code example for WifiManager.MulticastLock

Methods: isHeld, release

0
		super.onDestroy(); 
		if (channel != null) {
			running=false;
			channel.disconnect();
			channel.close();
			if (mcLock.isHeld()) {
				mcLock.release();
			} 
		} 
 
		textview.setText("activity destroyed");
		Toast.makeText(this, "activity destroyed", Toast.LENGTH_LONG).show();
 
	} 
 
	public void viewAccepted(View new_view) {
		// TODO Auto-generated method stub 
		System.out.println("received new view from " + new_view);
		view.setText("Received new view: " + new_view.getMembers().toString()
				+ "\n");