Builder
class Builder
kotlin.Any | |
↳ | 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(deviceHandles: MutableList<DeviceHandle!>) Adds a list of DeviceHandle to the list of devices for the ranging session. |
OobInitiatorRangingConfig |
build() Builds an instance of |
OobInitiatorRangingConfig.Builder |
setFastestRangingInterval(intervalMs: Duration) Sets the fastest ranging interval in milliseconds. |
OobInitiatorRangingConfig.Builder |
setRangingMode(rangingMode: Int) Sets the ranging mode for the session. |
OobInitiatorRangingConfig.Builder |
setSecurityLevel(securityLevel: Int) Sets the security level for the ranging session. |
OobInitiatorRangingConfig.Builder |
setSlowestRangingInterval(intervalMs: Duration) Sets the slowest ranging interval in milliseconds. |
Public constructors
Public methods
addDeviceHandle
fun addDeviceHandle(deviceHandle: DeviceHandle): OobInitiatorRangingConfig.Builder
Adds a DeviceHandle to the list of devices for the ranging session.
Parameters | |
---|---|
deviceHandle |
DeviceHandle: The DeviceHandle to add. This value cannot be null . |
Return | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance. This value cannot be null . |
addDeviceHandles
fun addDeviceHandles(deviceHandles: MutableList<DeviceHandle!>): OobInitiatorRangingConfig.Builder
Adds a list of DeviceHandle to the list of devices for the ranging session.
Parameters | |
---|---|
deviceHandles |
MutableList<DeviceHandle!>: The list of DeviceHandles to add. This value cannot be null . |
Return | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance. This value cannot be null . |
build
fun build(): OobInitiatorRangingConfig
Builds an instance of OobInitiatorRangingConfig
with the provided parameters.
Return | |
---|---|
OobInitiatorRangingConfig |
A new OobInitiatorRangingConfig instance. This value cannot be null . |
setFastestRangingInterval
fun setFastestRangingInterval(intervalMs: Duration): OobInitiatorRangingConfig.Builder
Sets the fastest ranging interval in milliseconds.
Parameters | |
---|---|
intervalMs |
Duration: The fastest interval in milliseconds. Defaults to 100ms This value cannot be null . |
Return | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance, for chaining calls. This value cannot be null . |
setRangingMode
fun setRangingMode(rangingMode: Int): OobInitiatorRangingConfig.Builder
Sets the ranging mode for the session.
Parameters | |
---|---|
rangingMode |
Int: The ranging mode to set. Defaults to RANGING_MODE_AUTO Value is android.ranging.oob.OobInitiatorRangingConfig#RANGING_MODE_AUTO , android.ranging.oob.OobInitiatorRangingConfig#RANGING_MODE_HIGH_ACCURACY , android.ranging.oob.OobInitiatorRangingConfig#RANGING_MODE_HIGH_ACCURACY_PREFERRED , or android.ranging.oob.OobInitiatorRangingConfig#RANGING_MODE_FUSED |
Return | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance. This value cannot be null . |
setSecurityLevel
fun setSecurityLevel(securityLevel: Int): OobInitiatorRangingConfig.Builder
Sets the security level for the ranging session.
Parameters | |
---|---|
securityLevel |
Int: The security level to set. Defaults to SECURITY_LEVEL_BASIC Value is android.ranging.oob.OobInitiatorRangingConfig#SECURITY_LEVEL_BASIC , or android.ranging.oob.OobInitiatorRangingConfig#SECURITY_LEVEL_SECURE |
Return | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance. This value cannot be null . |
setSlowestRangingInterval
fun setSlowestRangingInterval(intervalMs: Duration): OobInitiatorRangingConfig.Builder
Sets the slowest ranging interval in milliseconds.
Parameters | |
---|---|
intervalMs |
Duration: The slowest interval in milliseconds. Defaults to 5000ms This value cannot be null . |
Return | |
---|---|
OobInitiatorRangingConfig.Builder |
The Builder instance, for chaining calls. This value cannot be null . |