BleRssiRangingParams.Builder


public static final class BleRssiRangingParams.Builder
extends Object

java.lang.Object
   ↳ android.ranging.ble.rssi.BleRssiRangingParams.Builder


Builder class to create BleRssiRangingParams instances.

Summary

Public constructors

Builder(String peerBluetoothAddress)

Constructs a new Builder for creating a bluetooth rssi ranging session.

Public methods

BleRssiRangingParams build()

Builds and returns a BleRssiRangingParams instance.

BleRssiRangingParams.Builder setRangingUpdateRate(int updateRate)

Sets the update rate for the BLE rssi ranging session.

Inherited methods

Public constructors

Builder

public Builder (String peerBluetoothAddress)

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 is available to validate a Bluetooth address.

Parameters
peerBluetoothAddress String: The address of the peer device must be non-null Bluetooth address.

Throws
IllegalArgumentException if peerBluetoothAddress is null or does not conform to "00:11:22:33:AA:BB" format.

Public methods

build

public BleRssiRangingParams build ()

Builds and returns a BleRssiRangingParams instance.

Returns
BleRssiRangingParams a new BleRssiRangingParams. This value cannot be null.

setRangingUpdateRate

public BleRssiRangingParams.Builder setRangingUpdateRate (int updateRate)

Sets the update rate for the BLE rssi ranging session.

Defaults to ERROR(RangingUpdateRate.UPDATE_RATE_NORMAL/android.ranging.raw.RawRangingDevice.RangingUpdateRate#UPDATE_RATE_NORMAL RangingUpdateRate.UPDATE_RATE_NORMAL)

Parameters
updateRate int: the reporting frequency. Value is RawRangingDevice.UPDATE_RATE_NORMAL, RawRangingDevice.UPDATE_RATE_INFREQUENT, or RawRangingDevice.UPDATE_RATE_FREQUENT

Returns
BleRssiRangingParams.Builder this Builder instance. This value cannot be null.