WifiManager.MulticastLock.Release Method

Definition

Unlocks Wifi Multicast, restoring the filter of packets not addressed specifically to this device and saving power.

[Android.Runtime.Register("release", "()V", "GetReleaseHandler")]
public virtual void Release ();
[<Android.Runtime.Register("release", "()V", "GetReleaseHandler")>]
abstract member Release : unit -> unit
override this.Release : unit -> unit
Attributes

Remarks

Unlocks Wifi Multicast, restoring the filter of packets not addressed specifically to this device and saving power.

If this MulticastLock is reference-counted, each call to release will decrement the reference count, and the multicast packets will only stop being received when the reference count reaches zero. If the reference count goes below zero (that is, if release is called a greater number of times than #acquire), an exception is thrown.

If this MulticastLock is not reference-counted, the first call to release (after the radio was multicast locked using #acquire) will unlock the multicast, and subsequent calls will be ignored.

Note that if any other Wifi Multicast Locks are still outstanding this release call will not have an immediate effect. Only when all applications have released all their Multicast Locks will the Multicast filter be turned back on.

Also note that when an app exits or crashes all of its Multicast Locks will be automatically released.

Java documentation for android.net.wifi.WifiManager.MulticastLock.release().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to