Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
A builder class for creating instances of RangingDevice
.
Summary
Public constructors
Public methods
setUuid
fun setUuid(id: UUID): RangingDevice.Builder
Sets the UUID for the device.
Parameters |
id |
UUID: The UUID to assign to the device. This value cannot be null . |
Exceptions |
java.lang.IllegalArgumentException |
if the provided UUID 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-03-13 UTC.
[null,null,["Last updated 2025-03-13 UTC."],[],[],null,["# RangingDevice.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/RangingDevice.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.RangingDevice.Builder](#) |\n\nA builder class for creating instances of [RangingDevice](/reference/kotlin/android/ranging/RangingDevice).\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [RangingDevice](/reference/kotlin/android/ranging/RangingDevice) | [build](#build())`()` Builds a new instance of [RangingDevice](/reference/kotlin/android/ranging/RangingDevice) with the provided configuration. |\n| [RangingDevice.Builder](#) | [setUuid](#setUuid(java.util.UUID))`(`id:` `[UUID](../../java/util/UUID.html#)`)` Sets the UUID for the device. |\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### build\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): RangingDevice\n```\n\nBuilds a new instance of [RangingDevice](/reference/kotlin/android/ranging/RangingDevice) with the provided configuration.\n\n| Return ||\n|------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|\n| [RangingDevice](/reference/kotlin/android/ranging/RangingDevice) | A new [RangingDevice](/reference/kotlin/android/ranging/RangingDevice) instance. This value cannot be `null`. |\n\n### setUuid\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setUuid(id: UUID): RangingDevice.Builder\n```\n\nSets the UUID for the device.\n\n| Parameters ||\n|------|----------------------------------------------------------------------------------------------------------------------------------|\n| `id` | [UUID](../../java/util/UUID.html#): The [UUID](../../java/util/UUID.html#) to assign to the device. This value cannot be `null`. |\n\n| Return ||\n|----------------------------|----------------------------------------------------------|\n| [RangingDevice.Builder](#) | This [Builder](#) instance. This value cannot be `null`. |\n\n| Exceptions ||\n|--------------------------------------|-------------------------------|\n| `java.lang.IllegalArgumentException` | if the provided UUID is null. |"]]