Builder
class Builder
kotlin.Any | |
↳ | android.ranging.ble.rssi.BleRssiRangingParams.Builder |
Builder class to create BleRssiRangingParams
instances.
Summary
Public constructors | |
---|---|
Constructs a new |
Public methods | |
---|---|
BleRssiRangingParams |
build() Builds and returns a |
BleRssiRangingParams.Builder |
setRangingUpdateRate(updateRate: Int) Sets the update rate for the BLE 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
build
fun build(): BleRssiRangingParams
Builds and returns a BleRssiRangingParams
instance.
Return | |
---|---|
BleRssiRangingParams |
a new BleRssiRangingParams . This value cannot be null . |
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
Parameters | |
---|---|
updateRate |
Int: the reporting frequency. Value is android.ranging.raw.RawRangingDevice#UPDATE_RATE_NORMAL , android.ranging.raw.RawRangingDevice#UPDATE_RATE_INFREQUENT , or android.ranging.raw.RawRangingDevice#UPDATE_RATE_FREQUENT |
Return | |
---|---|
BleRssiRangingParams.Builder |
this Builder instance. This value cannot be null . |