Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder class for creating instances of UwbRangingParams
Summary
Public constructors |
Constructs a new Builder for creating a ranging session.
|
Public constructors
Builder
Builder(
sessionId: Int,
configId: Int,
deviceAddress: UwbAddress,
peerAddress: UwbAddress)
Constructs a new Builder
for creating a ranging session.
Exceptions |
java.lang.IllegalArgumentException |
if either deviceAddress or peerAddress is null. |
Public methods
setComplexChannel
fun setComplexChannel(complexChannel: UwbComplexChannel): UwbRangingParams.Builder
Sets the complex channel configuration for the ranging session.
Parameters |
complexChannel |
UwbComplexChannel: a non-null UwbComplexChannel instance representing the channel and preamble configuration. For better performance always use a random preamble index for each ranging session. |
Exceptions |
java.lang.IllegalArgumentException |
if the provided complex channel is null. |
setRangingUpdateRate
fun setRangingUpdateRate(rate: Int): UwbRangingParams.Builder
Sets the ranging update rate for the session.
Defaults to android.ranging.raw.RawRangingDevice.RangingUpdateRate#UPDATE_RATE_NORMAL.
setSessionKeyInfo
fun setSessionKeyInfo(sessionKeyInfo: ByteArray): UwbRangingParams.Builder
Sets the session key information for secure ranging.
Parameters |
sessionKeyInfo |
ByteArray: a byte array containing session key information. This value cannot be null . |
Exceptions |
java.lang.IllegalArgumentException |
if the provided byte array is null. |
setSlotDuration
fun setSlotDuration(durationMs: Int): UwbRangingParams.Builder
Sets the slot duration in milliseconds for the ranging session.
Defaults to DURATION_2_MS
.
Exceptions |
java.lang.IllegalArgumentException |
if the provided duration is out of range. |
setSubSessionId
fun setSubSessionId(subSessionId: Int): UwbRangingParams.Builder
Sets the sub-session ID for the ranging session.
Parameters |
subSessionId |
Int: the sub-session ID, which should be a unique identifier for the sub-session. |
setSubSessionKeyInfo
fun setSubSessionKeyInfo(subSessionKeyInfo: ByteArray): UwbRangingParams.Builder
Sets the sub-session key information for secure ranging.
Parameters |
subSessionKeyInfo |
ByteArray: a byte array containing sub-session key information. This value cannot be null . |
Exceptions |
java.lang.IllegalArgumentException |
if the provided map is null. |
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-01-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-23 UTC."],[],[]]