Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder class for creating instances of DeviceHandle
.
Summary
Public methods |
DeviceHandle |
Builds and returns a new DeviceHandle instance using the parameters provided to this builder.
|
Public constructors
Public methods
build
fun build(): DeviceHandle
Builds and returns a new DeviceHandle
instance using the parameters provided to this builder.
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.
[[["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-03-13 UTC."],[],[],null,["# DeviceHandle.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/oob/DeviceHandle.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.oob.DeviceHandle.Builder](#) |\n\nBuilder class for creating instances of [DeviceHandle](/reference/kotlin/android/ranging/oob/DeviceHandle).\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(android.ranging.RangingDevice,%20android.ranging.oob.TransportHandle))`(`rangingDevice:` `[RangingDevice](../RangingDevice.html#)`, `transportHandle:` `[TransportHandle](/reference/kotlin/android/ranging/oob/TransportHandle)`)` Constructs a new [Builder](#) with the required [RangingDevice](../RangingDevice.html#) and [TransportHandle](/reference/kotlin/android/ranging/oob/TransportHandle). |\n\n| Public methods ||\n|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DeviceHandle](/reference/kotlin/android/ranging/oob/DeviceHandle) | [build](#build())`()` Builds and returns a new [DeviceHandle](/reference/kotlin/android/ranging/oob/DeviceHandle) instance using the parameters provided to this builder. |\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 rangingDevice: RangingDevice, \n transportHandle: TransportHandle)\n```\n\nConstructs a new [Builder](#) with the required [RangingDevice](../RangingDevice.html#) and [TransportHandle](/reference/kotlin/android/ranging/oob/TransportHandle).\n\n| Parameters ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `rangingDevice` | [RangingDevice](../RangingDevice.html#): the [RangingDevice](../RangingDevice.html#) This value cannot be `null`. |\n| `transportHandle` | [TransportHandle](/reference/kotlin/android/ranging/oob/TransportHandle): Implementation of [TransportHandle](/reference/kotlin/android/ranging/oob/TransportHandle) for sending/receiving OOB data from peer This value cannot be `null`. |\n\n| Exceptions ||\n|----------------------------------|--------------------------------|\n| `java.lang.NullPointerException` | if either parameter is `null`. |\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(): DeviceHandle\n```\n\nBuilds and returns a new [DeviceHandle](/reference/kotlin/android/ranging/oob/DeviceHandle) instance using the parameters provided to this builder.\n\n| Return ||\n|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| [DeviceHandle](/reference/kotlin/android/ranging/oob/DeviceHandle) | a newly created [DeviceHandle](/reference/kotlin/android/ranging/oob/DeviceHandle) instance. This value cannot be `null`. |"]]