WifiManager.MulticastLock.Acquire Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Locks Wifi Multicast on until #release
is called.
[Android.Runtime.Register("acquire", "()V", "GetAcquireHandler")]
public virtual void Acquire ();
[<Android.Runtime.Register("acquire", "()V", "GetAcquireHandler")>]
abstract member Acquire : unit -> unit
override this.Acquire : unit -> unit
- Attributes
Remarks
Locks Wifi Multicast on until #release
is called.
If this MulticastLock is reference-counted each call to acquire
will increment the reference count, and the wifi interface will receive multicast packets as long as the reference count is above zero.
If this MulticastLock is not reference-counted, the first call to acquire
will turn on the multicast packets, but subsequent calls will be ignored. Only one call to #release
will be required, regardless of the number of times that acquire
is called.
Note that other applications may also lock Wifi Multicast on. Only they can relinquish their lock.
Also note that applications cannot leave Multicast locked on. When an app exits or crashes, any Multicast locks will be released.
Java documentation for android.net.wifi.WifiManager.MulticastLock.acquire()
.
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.