DeviceHandle.Builder
public
static
final
class
DeviceHandle.Builder
extends Object
| java.lang.Object | |
| ↳ | android.ranging.oob.DeviceHandle.Builder |
Builder class for creating instances of DeviceHandle.
Summary
Public constructors | |
|---|---|
Builder(RangingDevice rangingDevice, TransportHandle transportHandle)
Constructs a new |
|
Public methods | |
|---|---|
DeviceHandle
|
build()
Builds and returns a new |
DeviceHandle.Builder
|
setBluetoothDevice(BluetoothDevice bluetoothDevice)
Sets the |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (RangingDevice rangingDevice, TransportHandle transportHandle)
Constructs a new Builder with the required RangingDevice
and TransportHandle.
| Parameters | |
|---|---|
rangingDevice |
RangingDevice: the RangingDevice
This value cannot be null. |
transportHandle |
TransportHandle: Implementation of TransportHandle for sending/receiving
OOB data from peer.
This value cannot be null. |
| Throws | |
|---|---|
NullPointerException |
if either parameter is null. |
Public methods
build
public DeviceHandle build ()
Builds and returns a new DeviceHandle instance using the
parameters provided to this builder.
| Returns | |
|---|---|
DeviceHandle |
a newly created DeviceHandle instance.
This value cannot be null. |
setBluetoothDevice
public DeviceHandle.Builder setBluetoothDevice (BluetoothDevice bluetoothDevice)
Sets the BluetoothDevice associated with the target device. If this is set,
the underlying ranging service will use the bluetooth device as the target for
BLE RSSI and Channel Sounding ranging.
| Parameters | |
|---|---|
bluetoothDevice |
BluetoothDevice: the BluetoothDevice
This value cannot be null. |
| Returns | |
|---|---|
DeviceHandle.Builder |
the same DeviceHandle.Builder instance.
This value cannot be null. |