Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder class to create BleRssiRangingParams
instances.
Summary
Public constructors |
Constructs a new Builder for creating a bluetooth rssi ranging session.
|
Public constructors
Builder
Builder(peerBluetoothAddress: String)
Constructs a new Builder
for creating a bluetooth rssi 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 {@see 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. {@see android.bluetooth.BluetoothDevice#getAddress()} |
Exceptions |
java.lang.IllegalArgumentException |
if peerBluetoothAddress is null or does not conform to "00:11:22:33:AA:BB" format. |
Public methods
setRangingUpdateRate
fun setRangingUpdateRate(updateRate: Int): BleRssiRangingParams.Builder
Sets the update rate for the BLE rssi ranging session.
Defaults to android.ranging.raw.RawRangingDevice.RangingUpdateRate#UPDATE_RATE_NORMAL
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[null,null,["Last updated 2025-03-13 UTC."],[],[],null,["# BleRssiRangingParams.Builder\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/ranging/ble/rssi/BleRssiRangingParams.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.ranging.ble.rssi.BleRssiRangingParams.Builder](#) |\n\nBuilder class to create [BleRssiRangingParams](/reference/kotlin/android/ranging/ble/rssi/BleRssiRangingParams) instances.\n\nSummary\n-------\n\n| Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(kotlin.String))`(`peerBluetoothAddress:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Constructs a new [Builder](#) for creating a bluetooth rssi ranging session. |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [BleRssiRangingParams](/reference/kotlin/android/ranging/ble/rssi/BleRssiRangingParams) | [build](#build())`()` Builds and returns a [BleRssiRangingParams](/reference/kotlin/android/ranging/ble/rssi/BleRssiRangingParams) instance. |\n| [BleRssiRangingParams.Builder](#) | [setRangingUpdateRate](#setRangingUpdateRate(kotlin.Int))`(`updateRate:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the update rate for the BLE rssi ranging session. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder(peerBluetoothAddress: String)\n```\n\nConstructs a new [Builder](#) for creating a bluetooth rssi ranging session.\n\nValid 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 {@see android.bluetooth.BluetoothAdapter#checkBluetoothAddress} is available to validate a Bluetooth address.\n\n| Parameters ||\n|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `peerBluetoothAddress` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The address of the peer device must be non-null Bluetooth address. {@see android.bluetooth.BluetoothDevice#getAddress()} |\n\n| Exceptions ||\n|--------------------------------------|--------------------------------------------------------------------------------------|\n| `java.lang.IllegalArgumentException` | if `peerBluetoothAddress` is null or does not conform to \"00:11:22:33:AA:BB\" format. |\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): BleRssiRangingParams\n```\n\nBuilds and returns a [BleRssiRangingParams](/reference/kotlin/android/ranging/ble/rssi/BleRssiRangingParams) instance.\n\n| Return ||\n|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|\n| [BleRssiRangingParams](/reference/kotlin/android/ranging/ble/rssi/BleRssiRangingParams) | a new [BleRssiRangingParams](/reference/kotlin/android/ranging/ble/rssi/BleRssiRangingParams). This value cannot be `null`. |\n\n### setRangingUpdateRate\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setRangingUpdateRate(updateRate: Int): BleRssiRangingParams.Builder\n```\n\nSets the update rate for the BLE rssi ranging session.\n\nDefaults to android.ranging.raw.RawRangingDevice.RangingUpdateRate#UPDATE_RATE_NORMAL\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateRate` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the reporting frequency. Value is [android.ranging.raw.RawRangingDevice#UPDATE_RATE_NORMAL](../../raw/RawRangingDevice.html#UPDATE_RATE_NORMAL:kotlin.Int), [android.ranging.raw.RawRangingDevice#UPDATE_RATE_INFREQUENT](../../raw/RawRangingDevice.html#UPDATE_RATE_INFREQUENT:kotlin.Int), or [android.ranging.raw.RawRangingDevice#UPDATE_RATE_FREQUENT](../../raw/RawRangingDevice.html#UPDATE_RATE_FREQUENT:kotlin.Int) |\n\n| Return ||\n|-----------------------------------|----------------------------------------------------------|\n| [BleRssiRangingParams.Builder](#) | this [Builder](#) instance. This value cannot be `null`. |"]]