Added in API level 14

Channel


open class Channel : AutoCloseable
kotlin.Any
   ↳ android.net.wifi.p2p.WifiP2pManager.Channel

A channel that connects the application to the Wifi p2p framework. Most p2p operations require a Channel as an argument. An instance of Channel is obtained by doing a call on initialize

Summary

Public methods
open Unit

Close the current P2P connection and indicate to the P2P service that connections created by the app can be removed.

Protected methods
open Unit

Public methods

close

Added in API level 27
open fun close(): Unit

Close the current P2P connection and indicate to the P2P service that connections created by the app can be removed.

Exceptions
java.lang.Exception if this resource cannot be closed

Protected methods

finalize

Added in API level 14
protected open fun finalize(): Unit
Exceptions
java.lang.Throwable the Exception raised by this method