DiscoverySession.Close 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.
Destroy the publish or subscribe session - free any resources, and stop transmitting packets on-air (for an active session) or listening for matches (for a passive session).
[Android.Runtime.Register("close", "()V", "GetCloseHandler", ApiSince=26)]
public virtual void Close ();
[<Android.Runtime.Register("close", "()V", "GetCloseHandler", ApiSince=26)>]
abstract member Close : unit -> unit
override this.Close : unit -> unit
Implements
- Attributes
Remarks
Destroy the publish or subscribe session - free any resources, and stop transmitting packets on-air (for an active session) or listening for matches (for a passive session). The session may not be used for any additional operations after its destruction.
This operation must be done on a session which is no longer needed. Otherwise system resources will continue to be utilized until the application exits. The only exception is a session for which we received a termination callback, DiscoverySessionCallback#onSessionTerminated()
.
Java documentation for android.net.wifi.aware.DiscoverySession.close()
.
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.