Language

PublishDiscoverySession.AcceptDataPathRequest Method

Definition

Accept a Wi-Fi Aware data path request to create a connection with the target peer.

[Android.Runtime.Register("acceptDataPathRequest", "(Landroid/net/wifi/aware/PeerHandle;Landroid/net/wifi/aware/AwareDataPathRequest;)Z", "GetAcceptDataPathRequest_Landroid_net_wifi_aware_PeerHandle_Landroid_net_wifi_aware_AwareDataPathRequest_Handler", ApiSince=37)]
public virtual bool AcceptDataPathRequest(Android.Net.Wifi.Aware.PeerHandle peerHandle, Android.Net.Wifi.Aware.AwareDataPathRequest request);
[<Android.Runtime.Register("acceptDataPathRequest", "(Landroid/net/wifi/aware/PeerHandle;Landroid/net/wifi/aware/AwareDataPathRequest;)Z", "GetAcceptDataPathRequest_Landroid_net_wifi_aware_PeerHandle_Landroid_net_wifi_aware_AwareDataPathRequest_Handler", ApiSince=37)>]
abstract member AcceptDataPathRequest : Android.Net.Wifi.Aware.PeerHandle * Android.Net.Wifi.Aware.AwareDataPathRequest -> bool
override this.AcceptDataPathRequest : Android.Net.Wifi.Aware.PeerHandle * Android.Net.Wifi.Aware.AwareDataPathRequest -> bool

Parameters

peerHandle
PeerHandle

The peer's handle for the data path request.

request
AwareDataPathRequest

The data path request.

Returns

true if framework accept the data path request successfully and start negotiation, false otherwise.

Attributes

Remarks

Accept a Wi-Fi Aware data path request to create a connection with the target peer. The Aware data path request should be done in the context of a discovery session - after a DiscoverySessionCallback.onDataPathRequestReceived(PeerHandle) event is received. When the Aware data path setup succeeds, both side will receive DiscoverySessionCallback.onDataPathConnected(PeerHandle,WifiAwareNetworkInfo). Otherwise DiscoverySessionCallback.onDataPathRequestFailed(PeerHandle,int) will be called.

Android reference for android.net.wifi.aware.PublishDiscoverySession.acceptDataPathRequest.

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