WifiP2pManager.SetConnectionRequestResult 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.
Overloads
| Name | Description |
|---|---|
| SetConnectionRequestResult(WifiP2pManager+Channel, MacAddress, Int32, WifiP2pManager+IActionListener) |
Set the result for the incoming request from a specific peer. |
| SetConnectionRequestResult(WifiP2pManager+Channel, MacAddress, Int32, String, WifiP2pManager+IActionListener) |
Sets the result for an incoming request from a specific peer, with a PIN or password. |
SetConnectionRequestResult(WifiP2pManager+Channel, MacAddress, Int32, WifiP2pManager+IActionListener)
Set the result for the incoming request from a specific peer.
[Android.Runtime.Register("setConnectionRequestResult", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/MacAddress;ILandroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V", "GetSetConnectionRequestResult_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_MacAddress_ILandroid_net_wifi_p2p_WifiP2pManager_ActionListener_Handler", ApiSince=33)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_WIFI_NETWORK_SELECTION")]
public virtual void SetConnectionRequestResult(Android.Net.Wifi.P2p.WifiP2pManager.Channel c, Android.Net.MacAddress deviceAddress, int result, Android.Net.Wifi.P2p.WifiP2pManager.IActionListener? listener);
[<Android.Runtime.Register("setConnectionRequestResult", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/MacAddress;ILandroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V", "GetSetConnectionRequestResult_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_MacAddress_ILandroid_net_wifi_p2p_WifiP2pManager_ActionListener_Handler", ApiSince=33)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_WIFI_NETWORK_SELECTION")>]
abstract member SetConnectionRequestResult : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Android.Net.MacAddress * int * Android.Net.Wifi.P2p.WifiP2pManager.IActionListener -> unit
override this.SetConnectionRequestResult : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Android.Net.MacAddress * int * Android.Net.Wifi.P2p.WifiP2pManager.IActionListener -> unit
Parameters
The channel created by Initialize(Context, Looper, WifiP2pManager+IChannelListener). This value cannot be null.
- deviceAddress
- MacAddress
the peer which is bound to the external approver. This value cannot be null.
- result
- Int32
The response to the incoming request, as an integer value of ConnectionRequestType. Cast the enum value to int. Some values are available only on later Android versions.
- listener
- WifiP2pManager.IActionListener
for callback on success or failure. This value may be null.
- Attributes
Remarks
Set the result for the incoming request from a specific peer. 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. Requires android.permission.MANAGE_WIFI_NETWORK_SELECTION
Android reference for android.net.wifi.p2p.WifiP2pManager.setConnectionRequestResult.
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
SetConnectionRequestResult(WifiP2pManager+Channel, MacAddress, Int32, String, WifiP2pManager+IActionListener)
Sets the result for an incoming request from a specific peer, with a PIN or password.
[Android.Runtime.Register("setConnectionRequestResult", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/MacAddress;ILjava/lang/String;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V", "GetSetConnectionRequestResult_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_MacAddress_ILjava_lang_String_Landroid_net_wifi_p2p_WifiP2pManager_ActionListener_Handler", ApiSince=33)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_WIFI_NETWORK_SELECTION")]
public virtual void SetConnectionRequestResult(Android.Net.Wifi.P2p.WifiP2pManager.Channel c, Android.Net.MacAddress deviceAddress, int result, string? pinOrPassword, Android.Net.Wifi.P2p.WifiP2pManager.IActionListener? listener);
[<Android.Runtime.Register("setConnectionRequestResult", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/MacAddress;ILjava/lang/String;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V", "GetSetConnectionRequestResult_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_MacAddress_ILjava_lang_String_Landroid_net_wifi_p2p_WifiP2pManager_ActionListener_Handler", ApiSince=33)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_WIFI_NETWORK_SELECTION")>]
abstract member SetConnectionRequestResult : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Android.Net.MacAddress * int * string * Android.Net.Wifi.P2p.WifiP2pManager.IActionListener -> unit
override this.SetConnectionRequestResult : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Android.Net.MacAddress * int * string * Android.Net.Wifi.P2p.WifiP2pManager.IActionListener -> unit
Parameters
The channel created by Initialize(Context, Looper, WifiP2pManager+IChannelListener). This value cannot be null.
- deviceAddress
- MacAddress
the peer which is bound to the external approver. This value cannot be null.
- result
- Int32
The response to the incoming request, as an integer value of ConnectionRequestType. Cast the enum value to int. Some values are available only on later Android versions.
- pinOrPassword
- String
The WPS PIN or Wi-Fi Direct R2 pairing bootstrapping PIN or password for the incoming request. The value must not be null or empty when result corresponds to Accept; otherwise, it may be null.
- listener
- WifiP2pManager.IActionListener
for callback on success or failure. This value may be null.
- Attributes
Remarks
Sets the result for an incoming request from a specific peer, with a PIN or password. 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. Requires android.permission.MANAGE_WIFI_NETWORK_SELECTION
Android reference for android.net.wifi.p2p.WifiP2pManager.setConnectionRequestResult.
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.