Language

RangingRequest.Builder.AddWifiAwarePeer Method

Definition

Overloads

Name Description
AddWifiAwarePeer(MacAddress)

Add the device specified by the peerMacAddress to the list of devices with which to measure range.

AddWifiAwarePeer(PeerHandle)

Add a device specified by a PeerHandle to the list of devices with which to measure range.

AddWifiAwarePeer(MacAddress)

Add the device specified by the peerMacAddress to the list of devices with which to measure range.

[Android.Runtime.Register("addWifiAwarePeer", "(Landroid/net/MacAddress;)Landroid/net/wifi/rtt/RangingRequest$Builder;", "", ApiSince=28)]
public Android.Net.Wifi.Rtt.RangingRequest.Builder? AddWifiAwarePeer(Android.Net.MacAddress peerMacAddress);
[<Android.Runtime.Register("addWifiAwarePeer", "(Landroid/net/MacAddress;)Landroid/net/wifi/rtt/RangingRequest$Builder;", "", ApiSince=28)>]
member this.AddWifiAwarePeer : Android.Net.MacAddress -> Android.Net.Wifi.Rtt.RangingRequest.Builder

Parameters

peerMacAddress
MacAddress

The MAC address of the Wi-Fi Aware peer. This value cannot be null.

Returns

The builder, to facilitate chaining builder.setXXX(..).setXXX(..).

Attributes

Remarks

Add the device specified by the peerMacAddress to the list of devices with which to measure range.

The MAC address may be obtained out-of-band from a peer Wi-Fi Aware device. A Wi-Fi Aware device may obtain its MAC address using the IdentityChangedListener provided to WifiAwareManager.attach(AttachCallback,IdentityChangedListener,Handler).

Android reference for android.net.wifi.rtt.RangingRequest.Builder.addWifiAwarePeer.

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

AddWifiAwarePeer(PeerHandle)

Add a device specified by a PeerHandle to the list of devices with which to measure range.

[Android.Runtime.Register("addWifiAwarePeer", "(Landroid/net/wifi/aware/PeerHandle;)Landroid/net/wifi/rtt/RangingRequest$Builder;", "", ApiSince=28)]
public Android.Net.Wifi.Rtt.RangingRequest.Builder? AddWifiAwarePeer(Android.Net.Wifi.Aware.PeerHandle peerHandle);
[<Android.Runtime.Register("addWifiAwarePeer", "(Landroid/net/wifi/aware/PeerHandle;)Landroid/net/wifi/rtt/RangingRequest$Builder;", "", ApiSince=28)>]
member this.AddWifiAwarePeer : Android.Net.Wifi.Aware.PeerHandle -> Android.Net.Wifi.Rtt.RangingRequest.Builder

Parameters

peerHandle
PeerHandle

The peer handler of the peer Wi-Fi Aware device. This value cannot be null.

Returns

The builder, to facilitate chaining builder.setXXX(..).setXXX(..).

Attributes

Remarks

Add a device specified by a PeerHandle to the list of devices with which to measure range.

The PeerHandle may be obtained as part of the Wi-Fi Aware discovery process. E.g. using DiscoverySessionCallback.onServiceDiscovered(PeerHandle,byte[],List).

Note: in order to use this API the device must support Wi-Fi Aware android.net.wifi.aware. The requesting device can be either publisher or subscriber in a discovery session. For both requesting device and peer device ranging must be enabled on the discovery session: PublishConfig.Builder.setRangingEnabled(boolean) for publisher; SubscribeConfig.Builder.setEgressDistanceMm(int) or SubscribeConfig.Builder.setIngressDistanceMm(int) must be set to enable ranging on subscriber

Android reference for android.net.wifi.rtt.RangingRequest.Builder.addWifiAwarePeer.

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