Builder


class Builder
kotlin.Any
   ↳ android.ranging.oob.OobInitiatorRangingConfig.Builder

Builder class for creating instances of OobInitiatorRangingConfig.

Summary

Public constructors

Public methods
OobInitiatorRangingConfig.Builder

Adds a DeviceHandle to the list of devices for the ranging session.

OobInitiatorRangingConfig.Builder

Adds a list of DeviceHandle to the list of devices for the ranging session.

OobInitiatorRangingConfig

Builds an instance of OobInitiatorRangingConfig with the provided parameters.

OobInitiatorRangingConfig.Builder

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

Sets the slowest ranging interval in milliseconds.

Public constructors

Builder

Builder()

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.

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.