Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder class for constructing instances of RawInitiatorRangingConfig
.
Summary
Public constructors
Public methods
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-04-17 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-04-17 UTC."],[],[],null,["# RawInitiatorRangingConfig.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/raw/RawInitiatorRangingConfig.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.raw.RawInitiatorRangingConfig.Builder](#) |\n\nBuilder class for constructing instances of [RawInitiatorRangingConfig](/reference/kotlin/android/ranging/raw/RawInitiatorRangingConfig).\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [RawInitiatorRangingConfig.Builder](#) | [addRawRangingDevice](#addRawRangingDevice(android.ranging.raw.RawRangingDevice))`(`rangingDevice:` `[RawRangingDevice](/reference/kotlin/android/ranging/raw/RawRangingDevice)`)` Adds a [RawRangingDevice](/reference/kotlin/android/ranging/raw/RawRangingDevice) to the list of devices for this session. |\n| [RawInitiatorRangingConfig.Builder](#) | [addRawRangingDevices](#addRawRangingDevices(kotlin.collections.MutableList))`(`rangingDevices:` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\u003c[RawRangingDevice](/reference/kotlin/android/ranging/raw/RawRangingDevice)!\u003e`)` Adds a list of [android.ranging.raw.RawRangingDevice](/reference/kotlin/android/ranging/raw/RawRangingDevice) to the list of devices for this session. |\n| [RawInitiatorRangingConfig](/reference/kotlin/android/ranging/raw/RawInitiatorRangingConfig) | [build](#build())`()` Builds and returns a new [RawInitiatorRangingConfig](/reference/kotlin/android/ranging/raw/RawInitiatorRangingConfig) instance. |\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()\n```\n\nPublic methods\n--------------\n\n### addRawRangingDevice\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun addRawRangingDevice(rangingDevice: RawRangingDevice): RawInitiatorRangingConfig.Builder\n```\n\nAdds a [RawRangingDevice](/reference/kotlin/android/ranging/raw/RawRangingDevice) to the list of devices for this session.\n\n| Parameters ||\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------|\n| `rangingDevice` | [RawRangingDevice](/reference/kotlin/android/ranging/raw/RawRangingDevice): the device to be added. This value cannot be `null`. |\n\n| Return ||\n|----------------------------------------|----------------------------------------------------------|\n| [RawInitiatorRangingConfig.Builder](#) | this [Builder](#) instance. This value cannot be `null`. |\n\n### addRawRangingDevices\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun addRawRangingDevices(rangingDevices: MutableList\u003cRawRangingDevice!\u003e): RawInitiatorRangingConfig.Builder\n```\n\nAdds a list of [android.ranging.raw.RawRangingDevice](/reference/kotlin/android/ranging/raw/RawRangingDevice) to the list of devices for this session.\n\n| Parameters ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `rangingDevices` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[RawRangingDevice](/reference/kotlin/android/ranging/raw/RawRangingDevice)!\\\u003e: the list of devices to be added. This value cannot be `null`. |\n\n| Return ||\n|----------------------------------------|----------------------------------------------------------|\n| [RawInitiatorRangingConfig.Builder](#) | this [Builder](#) instance. This value cannot be `null`. |\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(): RawInitiatorRangingConfig\n```\n\nBuilds and returns a new [RawInitiatorRangingConfig](/reference/kotlin/android/ranging/raw/RawInitiatorRangingConfig) instance.\n\n| Return ||\n|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| [RawInitiatorRangingConfig](/reference/kotlin/android/ranging/raw/RawInitiatorRangingConfig) | a configured instance of [RawInitiatorRangingConfig](/reference/kotlin/android/ranging/raw/RawInitiatorRangingConfig). This value cannot be `null`. |\n\n| Exceptions ||\n|--------------------------------------|-------------------------------------------------------------------------------------------------|\n| `java.lang.IllegalArgumentException` | if no [RawRangingDevice](/reference/kotlin/android/ranging/raw/RawRangingDevice) is configured. |"]]