Language

WifiP2pManager.RemoveClient Method

Definition

Remove the client with the MAC address from the group.

[Android.Runtime.Register("removeClient", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/MacAddress;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V", "GetRemoveClient_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_MacAddress_Landroid_net_wifi_p2p_WifiP2pManager_ActionListener_Handler", ApiSince=33)]
public virtual void RemoveClient(Android.Net.Wifi.P2p.WifiP2pManager.Channel channel, Android.Net.MacAddress peerAddress, Android.Net.Wifi.P2p.WifiP2pManager.IActionListener? listener);
[<Android.Runtime.Register("removeClient", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/MacAddress;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V", "GetRemoveClient_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_MacAddress_Landroid_net_wifi_p2p_WifiP2pManager_ActionListener_Handler", ApiSince=33)>]
abstract member RemoveClient : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Android.Net.MacAddress * Android.Net.Wifi.P2p.WifiP2pManager.IActionListener -> unit
override this.RemoveClient : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Android.Net.MacAddress * Android.Net.Wifi.P2p.WifiP2pManager.IActionListener -> unit

Parameters

channel
WifiP2pManager.Channel

The channel created by Initialize(Context, Looper, WifiP2pManager+IChannelListener). This value cannot be null.

peerAddress
MacAddress

MAC address of the client. This value cannot be null.

listener
WifiP2pManager.IActionListener

for callbacks on success or failure. Can be null.

Attributes

Remarks

Remove the client with the MAC address from the group.

The function call immediately returns after sending a client removal request to the framework. The application is notified of a success or failure to initiate client removal through listener callbacks OnSuccess() or OnFailure(WifiP2pFailureReason).

The callbacks are triggered on the thread specified when initializing the channel, see Initialize(Context, Looper, WifiP2pManager+IChannelListener).

Check IsGroupClientRemovalSupported to determine whether the device supports this feature. This method throws UnsupportedOperationException if the property is false.

Android reference for android.net.wifi.p2p.WifiP2pManager.removeClient.

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