PublishDiscoverySession.AcceptDataPathRequest 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.
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 the acceptance request was sent to the Wi-Fi Aware service; false if the session has terminated or the Wi-Fi Aware manager is unavailable. A true result does not confirm that the connection was established.
- Attributes
Remarks
Accept the request after OnDataPathRequestReceived(PeerHandle) is called. When setup succeeds, both peers receive OnDataPathConnected(PeerHandle, WifiAwareNetworkInfo). Otherwise, OnDataPathRequestFailed(PeerHandle, Int32) is 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.