Share via


WifiP2pManager.IExternalApproverRequestListener.OnConnectionRequested Method

Definition

Called when there is an incoming connection request which matches a peer (identified by its MacAddress) registered by the external approver through #addExternalApprover(Channel, MacAddress, ExternalApproverRequestListener).

[Android.Runtime.Register("onConnectionRequested", "(ILandroid/net/wifi/p2p/WifiP2pConfig;Landroid/net/wifi/p2p/WifiP2pDevice;)V", "GetOnConnectionRequested_ILandroid_net_wifi_p2p_WifiP2pConfig_Landroid_net_wifi_p2p_WifiP2pDevice_Handler:Android.Net.Wifi.P2p.WifiP2pManager/IExternalApproverRequestListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=33)]
public void OnConnectionRequested (int requestType, Android.Net.Wifi.P2p.WifiP2pConfig config, Android.Net.Wifi.P2p.WifiP2pDevice device);
[<Android.Runtime.Register("onConnectionRequested", "(ILandroid/net/wifi/p2p/WifiP2pConfig;Landroid/net/wifi/p2p/WifiP2pDevice;)V", "GetOnConnectionRequested_ILandroid_net_wifi_p2p_WifiP2pConfig_Landroid_net_wifi_p2p_WifiP2pDevice_Handler:Android.Net.Wifi.P2p.WifiP2pManager/IExternalApproverRequestListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=33)>]
abstract member OnConnectionRequested : int * Android.Net.Wifi.P2p.WifiP2pConfig * Android.Net.Wifi.P2p.WifiP2pDevice -> unit

Parameters

requestType
Int32

is one of #REQUEST_TYPE_NEGOTIATION, #REQUEST_TYPE_INVITATION, and #REQUEST_TYPE_JOIN.

config
WifiP2pConfig

is the peer configuration.

device
WifiP2pDevice

is the peer information.

Attributes

Remarks

Called when there is an incoming connection request which matches a peer (identified by its MacAddress) registered by the external approver through #addExternalApprover(Channel, MacAddress, ExternalApproverRequestListener). The external approver is expected to follow up with a connection decision using the #setConnectionRequestResult(Channel, MacAddress, int, ActionListener) with #CONNECTION_REQUEST_ACCEPT, #CONNECTION_REQUEST_REJECT, or #CONNECTION_REQUEST_DEFER_TO_SERVICE.

Java documentation for android.net.wifi.p2p.WifiP2pManager.ExternalApproverRequestListener.onConnectionRequested(int, android.net.wifi.p2p.WifiP2pConfig, android.net.wifi.p2p.WifiP2pDevice).

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