RttRangingParams.Builder
public
static
final
class
RttRangingParams.Builder
extends Object
| java.lang.Object | |
| ↳ | android.ranging.wifi.rtt.RttRangingParams.Builder |
Builder class for RttRangingParams.
Summary
Public constructors | |
|---|---|
Builder(String serviceName)
Constructs a new |
|
Public methods | |
|---|---|
RttRangingParams
|
build()
Builds and returns a new |
RttRangingParams.Builder
|
setMatchFilter(byte[] matchFilter)
Sets the match filter to identify specific devices or services for RTT. |
RttRangingParams.Builder
|
setPeriodicRangingHwFeatureEnabled(boolean periodicRangingHwFeatureEnabled)
Sets whether to use hardware supported periodic ranging feature in WiFi Nan-RTT. |
RttRangingParams.Builder
|
setRangingUpdateRate(int updateRate)
Sets the update rate for the RTT ranging session. |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (String serviceName)
Constructs a new Builder for creating a Wifi NAN-RTT ranging session.
| Parameters | |
|---|---|
serviceName |
String: The service name associated with this session.
This value cannot be null. |
| Throws | |
|---|---|
IllegalArgumentException |
if serviceName is null. |
Public methods
build
public RttRangingParams build ()
Builds and returns a new RttRangingParams instance.
| Returns | |
|---|---|
RttRangingParams |
a new RttRangingParams object configured with the provided parameters.
This value cannot be null. |
setMatchFilter
public RttRangingParams.Builder setMatchFilter (byte[] matchFilter)
Sets the match filter to identify specific devices or services for RTT.
| Parameters | |
|---|---|
matchFilter |
byte: a byte array representing the filter.
This value cannot be null. |
| Returns | |
|---|---|
RttRangingParams.Builder |
this Builder instance.
This value cannot be null. |
| Throws | |
|---|---|
NullPointerException |
if either parameter is matchFilter is null. |
setPeriodicRangingHwFeatureEnabled
public RttRangingParams.Builder setPeriodicRangingHwFeatureEnabled (boolean periodicRangingHwFeatureEnabled)
Sets whether to use hardware supported periodic ranging feature in WiFi Nan-RTT.
| Parameters | |
|---|---|
periodicRangingHwFeatureEnabled |
boolean: true to enable periodic ranging;
false otherwise. |
| Returns | |
|---|---|
RttRangingParams.Builder |
this Builder instance.
This value cannot be null. |
setRangingUpdateRate
public RttRangingParams.Builder setRangingUpdateRate (int updateRate)
Sets the update rate for the RTT ranging session.
| Returns | |
|---|---|
RttRangingParams.Builder |
this Builder instance.
This value cannot be null. |