BleCsRangingParams.Builder


public static final class BleCsRangingParams.Builder
extends Object

java.lang.Object
   ↳ android.ranging.ble.cs.BleCsRangingParams.Builder


Builder class to create BleCsRangingParams instances.

Summary

Public constructors

Builder(String peerBluetoothAddress)

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

Public methods

BleCsRangingParams build()

Builds and returns a BleCsRangingParams instance.

BleCsRangingParams.Builder setLocationType(int locationType)

Sets the location type for the ranging session.

BleCsRangingParams.Builder setRangingUpdateRate(int updateRate)

Sets the update rate for the CS ranging session.

BleCsRangingParams.Builder setSecurityLevel(int securityLevel)

Sets the security level for the ranging session.

BleCsRangingParams.Builder setSightType(int sightType)

Sets the sight type for the ranging session.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

public Builder (String peerBluetoothAddress)

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 BluetoothAdapter.checkBluetoothAddress(String) 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 BleCsRangingParams build ()

Builds and returns a BleCsRangingParams instance.

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

setLocationType

public BleCsRangingParams.Builder setLocationType (int locationType)

Sets the location type for the ranging session.

Defaults to BleCsRangingParams.LOCATION_TYPE_UNKNOWN

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

setRangingUpdateRate

public BleCsRangingParams.Builder setRangingUpdateRate (int updateRate)

Sets the update rate for the CS ranging session.

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

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

setSecurityLevel

public BleCsRangingParams.Builder setSecurityLevel (int securityLevel)

Sets the security level for the ranging session.

Defaults to BleCsRangingCapabilities.CS_SECURITY_LEVEL_ONE

Parameters
securityLevel int: the security level. Value is BleCsRangingCapabilities.CS_SECURITY_LEVEL_ONE, or BleCsRangingCapabilities.CS_SECURITY_LEVEL_FOUR

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

setSightType

public BleCsRangingParams.Builder setSightType (int sightType)

Sets the sight type for the ranging session.

Defaults to BleCsRangingParams.SIGHT_TYPE_UNKNOWN

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