ResponderConfig.Builder.SetPeerHandle(PeerHandle) 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.
Sets the Responder Aware Peer handle.
[Android.Runtime.Register("setPeerHandle", "(Landroid/net/wifi/aware/PeerHandle;)Landroid/net/wifi/rtt/ResponderConfig$Builder;", "", ApiSince=37)]
public Android.Net.Wifi.Rtt.ResponderConfig.Builder SetPeerHandle(Android.Net.Wifi.Aware.PeerHandle? peerHandle);
[<Android.Runtime.Register("setPeerHandle", "(Landroid/net/wifi/aware/PeerHandle;)Landroid/net/wifi/rtt/ResponderConfig$Builder;", "", ApiSince=37)>]
member this.SetPeerHandle : Android.Net.Wifi.Aware.PeerHandle -> Android.Net.Wifi.Rtt.ResponderConfig.Builder
Parameters
- peerHandle
- PeerHandle
Peer handle of the responder. This value may be null.
Returns
the builder to facilitate chaining builder.setXXX(..).setXXX(..). This value cannot be null.
- Attributes
Remarks
Sets the Responder Aware Peer handle.
Use this method to identify the responder when it is a Wi-Fi Aware peer. The PeerHandle is a unique identifier for an Aware peer obtained through Wi-Fi Aware discovery processes.
A responder must be identified by either a PeerHandle (for Aware peers) or a MacAddress (for non-Aware peers like Access Points or Wi-Fi Direct devices), but not both.
Note: This method sets the peer handle. If a MAC address was previously set using setMacAddress(MacAddress), both identifiers might be temporarily present within the builder. The final validation ensuring that only one of these identifiers is exclusively set occurs during the build() operation. If build() is called when both a MAC address and a PeerHandle are configured or when neither is set, it will result in an IllegalArgumentException.
Android reference for android.net.wifi.rtt.ResponderConfig.Builder.setPeerHandle.
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.