Added in API level 36

Builder


class Builder

Builder class to create BleCsRangingParams instances.

Summary

Public constructors
Builder(peerBluetoothAddress: String)

Constructs a new Builder for creating a channel sounding ranging session.

Public methods
BleCsRangingParams

Builds and returns a BleCsRangingParams instance.

BleCsRangingParams.Builder
setLocationType(locationType: Int)

Sets the location type for the ranging session.

BleCsRangingParams.Builder

Sets the update rate for the CS ranging session.

BleCsRangingParams.Builder
setSecurityLevel(securityLevel: Int)

Sets the security level for the ranging session.

BleCsRangingParams.Builder
setSightType(sightType: Int)

Sets the sight type for the ranging session.

Public constructors

Builder

Added in API level 36
Builder(peerBluetoothAddress: String)

Constructs a new Builder for creating a channel sounding ranging session.

Valid Bluetooth hardware addresses must be upper case, in big endian byte order, and in a format such as "00:11:22:33:AA:BB". The helper android.bluetooth.BluetoothAdapter#checkBluetoothAddress is available to validate a Bluetooth address.

Parameters
peerBluetoothAddress String: The address of the peer device must be non-null Bluetooth address.
Exceptions
java.lang.IllegalArgumentException if peerBluetoothAddress is null or does not conform to "00:11:22:33:AA:BB" format.

Public methods

build

Added in API level 36
fun build(): BleCsRangingParams

Builds and returns a BleCsRangingParams instance.

Return
BleCsRangingParams a new BleCsRangingParams. This value cannot be null.

setLocationType

Added in API level 36
fun setLocationType(locationType: Int): BleCsRangingParams.Builder

Sets the location type for the ranging session.

Defaults to LOCATION_TYPE_UNKNOWN

Return
BleCsRangingParams.Builder this Builder instance. This value cannot be null.

setRangingUpdateRate

Added in API level 36
fun setRangingUpdateRate(updateRate: Int): BleCsRangingParams.Builder

Sets the update rate for the CS ranging session.

Defaults to android.ranging.raw.RawRangingDevice.RangingUpdateRate#UPDATE_RATE_NORMAL

Return
BleCsRangingParams.Builder this Builder instance. This value cannot be null.

setSecurityLevel

Added in API level 36
fun setSecurityLevel(securityLevel: Int): BleCsRangingParams.Builder

Sets the security level for the ranging session.

Defaults to BleCsRangingCapabilities.CS_SECURITY_LEVEL_ONE

Return
BleCsRangingParams.Builder this Builder instance. This value cannot be null.

setSightType

Added in API level 36
fun setSightType(sightType: Int): BleCsRangingParams.Builder

Sets the sight type for the ranging session.

Defaults to SIGHT_TYPE_UNKNOWN

Return
BleCsRangingParams.Builder this Builder instance. This value cannot be null.

API reference packages and classes for Android app developers.

Updated Feb 10, 2025

API reference packages and classes for Android app developers.

Updated Feb 10, 2025

Déclare un format de compression de texture GL unique compatible avec l'application. Une application est compatible avec un format de compression de texture GL si elle est capable de fournir des éléments de texture compressés dans ce format une fois que l'application...

Updated Aug 22, 2024