Language

WifiP2pManager.RequestDirInfo Method

Definition

Get the Device Identity Resolution (DIR) Information.

[Android.Runtime.Register("requestDirInfo", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetRequestDirInfo_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=36)]
public virtual void RequestDirInfo(Android.Net.Wifi.P2p.WifiP2pManager.Channel c, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("requestDirInfo", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetRequestDirInfo_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=36)>]
abstract member RequestDirInfo : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.RequestDirInfo : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

c
WifiP2pManager.Channel

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

executor
IExecutor

The executor on which callback will be invoked. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use MainExecutor. Otherwise, provide an Executor that dispatches to an appropriate thread.

callback
IOutcomeReceiver

A callback that receives WifiP2pDirInfo through OnResult(Object), or null if the DIR information does not exist. On failure, such as a permission error or a busy state machine, OnError(Object) is called. This value cannot be null.

Attributes

Remarks

Get the Device Identity Resolution (DIR) Information. See WifiP2pDirInfo for details Note: The results callback receives null if the device doesn't have any persistent group with device identity key information.

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

The app needs android.permission.NEARBY_WIFI_DEVICES. If it does not declare android:usesPermissionFlags="neverForLocation" for that permission, it also needs android.permission.ACCESS_FINE_LOCATION.

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

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