SubscribeDiscoverySession.InitiateDataPathRequest 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.
Initiate a Wi-Fi Aware data path request to create a connection with the target peer.
[Android.Runtime.Register("initiateDataPathRequest", "(Landroid/net/wifi/aware/PeerHandle;Landroid/net/wifi/aware/AwareDataPathRequest;)Z", "GetInitiateDataPathRequest_Landroid_net_wifi_aware_PeerHandle_Landroid_net_wifi_aware_AwareDataPathRequest_Handler", ApiSince=37)]
public virtual bool InitiateDataPathRequest(Android.Net.Wifi.Aware.PeerHandle peerHandle, Android.Net.Wifi.Aware.AwareDataPathRequest request);
[<Android.Runtime.Register("initiateDataPathRequest", "(Landroid/net/wifi/aware/PeerHandle;Landroid/net/wifi/aware/AwareDataPathRequest;)Z", "GetInitiateDataPathRequest_Landroid_net_wifi_aware_PeerHandle_Landroid_net_wifi_aware_AwareDataPathRequest_Handler", ApiSince=37)>]
abstract member InitiateDataPathRequest : Android.Net.Wifi.Aware.PeerHandle * Android.Net.Wifi.Aware.AwareDataPathRequest -> bool
override this.InitiateDataPathRequest : 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 starts the data path setup successfully, false otherwise.
- Attributes
Remarks
Initiate 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.onServiceDiscovered(ServiceDiscoveryInfo) 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.SubscribeDiscoverySession.initiateDataPathRequest.
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.