OobInitiatorRangingConfig.Builder
public
static
final
class
OobInitiatorRangingConfig.Builder
extends Object
java.lang.Object | |
↳ | android.ranging.oob.OobInitiatorRangingConfig.Builder |
Builder class for creating instances of OobInitiatorRangingConfig
.
Summary
Public constructors | |
---|---|
Builder()
|
Public methods | |
---|---|
OobInitiatorRangingConfig.Builder
|
addDeviceHandle(DeviceHandle deviceHandle)
Adds a DeviceHandle to the list of devices for the ranging session. |
OobInitiatorRangingConfig.Builder
|
addDeviceHandles(List<DeviceHandle> deviceHandles)
Adds a list of DeviceHandle to the list of devices for the ranging session. |
OobInitiatorRangingConfig
|
build()
Builds an instance of |
OobInitiatorRangingConfig.Builder
|
setFastestRangingInterval(Duration intervalMs)
Sets the fastest ranging interval in milliseconds. |
OobInitiatorRangingConfig.Builder
|
setRangingMode(int rangingMode)
Sets the ranging mode for the session. |
OobInitiatorRangingConfig.Builder
|
setSecurityLevel(int securityLevel)
Sets the security level for the ranging session. |
OobInitiatorRangingConfig.Builder
|
setSlowestRangingInterval(Duration intervalMs)
Sets the slowest ranging interval in milliseconds. |
Inherited methods | |
---|---|
Public constructors
Public methods
addDeviceHandle
public OobInitiatorRangingConfig.Builder addDeviceHandle (DeviceHandle deviceHandle)
Adds a DeviceHandle to the list of devices for the ranging session.
Parameters | |
---|---|
deviceHandle |
DeviceHandle : The DeviceHandle to add.
This value cannot be null . |
Returns | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance.
This value cannot be null . |
addDeviceHandles
public OobInitiatorRangingConfig.Builder addDeviceHandles (List<DeviceHandle> deviceHandles)
Adds a list of DeviceHandle to the list of devices for the ranging session.
Parameters | |
---|---|
deviceHandles |
List : The list of DeviceHandles to add.
This value cannot be null . |
Returns | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance.
This value cannot be null . |
build
public OobInitiatorRangingConfig build ()
Builds an instance of OobInitiatorRangingConfig
with the provided parameters.
Returns | |
---|---|
OobInitiatorRangingConfig |
A new OobInitiatorRangingConfig instance.
This value cannot be null . |
setFastestRangingInterval
public OobInitiatorRangingConfig.Builder setFastestRangingInterval (Duration intervalMs)
Sets the fastest ranging interval in milliseconds.
Parameters | |
---|---|
intervalMs |
Duration : The fastest interval in milliseconds.
Defaults to 100ms
This value cannot be null . |
Returns | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance, for chaining calls.
This value cannot be null . |
setRangingMode
public OobInitiatorRangingConfig.Builder setRangingMode (int rangingMode)
Sets the ranging mode for the session.
Parameters | |
---|---|
rangingMode |
int : The ranging mode to set.
Defaults to OobInitiatorRangingConfig.RANGING_MODE_AUTO
Value is OobInitiatorRangingConfig.RANGING_MODE_AUTO , OobInitiatorRangingConfig.RANGING_MODE_HIGH_ACCURACY , OobInitiatorRangingConfig.RANGING_MODE_HIGH_ACCURACY_PREFERRED , or OobInitiatorRangingConfig.RANGING_MODE_FUSED |
Returns | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance.
This value cannot be null . |
setSecurityLevel
public OobInitiatorRangingConfig.Builder setSecurityLevel (int securityLevel)
Sets the security level for the ranging session.
Parameters | |
---|---|
securityLevel |
int : The security level to set.
Defaults to OobInitiatorRangingConfig.SECURITY_LEVEL_BASIC
Value is OobInitiatorRangingConfig.SECURITY_LEVEL_BASIC , or OobInitiatorRangingConfig.SECURITY_LEVEL_SECURE |
Returns | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance.
This value cannot be null . |
setSlowestRangingInterval
public OobInitiatorRangingConfig.Builder setSlowestRangingInterval (Duration intervalMs)
Sets the slowest ranging interval in milliseconds.
Parameters | |
---|---|
intervalMs |
Duration : The slowest interval in milliseconds.
Defaults to 5000ms
This value cannot be null . |
Returns | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance, for chaining calls.
This value cannot be null . |