Added in version 37.2
OutOfBandPairingRequest.Builder
public
static
final
class
OutOfBandPairingRequest.Builder
extends Object
| java.lang.Object | |
| ↳ | android.companion.OutOfBandPairingRequest.Builder |
A builder for creating OutOfBandPairingRequest.
Summary
Public constructors | |
|---|---|
Builder()
|
|
Public methods | |
|---|---|
OutOfBandPairingRequest
|
build()
Builds the |
OutOfBandPairingRequest.Builder
|
setBluetoothLe(boolean bluetoothLe)
Sets whether Bluetooth Low Energy (LE) out-of-band (OOB) pairing is requested. |
Inherited methods | |
|---|---|
Public constructors
Public methods
build
Added in version 37.2
public OutOfBandPairingRequest build ()
Builds the OutOfBandPairingRequest object.
| Returns | |
|---|---|
OutOfBandPairingRequest |
This value cannot be null. |
setBluetoothLe
Added in version 37.2
public OutOfBandPairingRequest.Builder setBluetoothLe (boolean bluetoothLe)
Sets whether Bluetooth Low Energy (LE) out-of-band (OOB) pairing is requested.
Important requirements for Bluetooth LE OOB pairing:
- Transport & Connection: Bluetooth OOB pairing via
CompanionDeviceManageroperates exclusively over Bluetooth Low Energy (LE). The remote device must be an LE device, and an active LE connection (e.g., an L2CAP LE data channel) must already be established between the two devices prior to requesting OOB pairing. - Device Address Registration: Because LE devices frequently rotate their air
addresses (Resolvable Private Addresses), you must explicitly register the remote
device's active LE MAC address using
CompanionDeviceManager.createAndSetDeviceIdbefore starting Bluetooth OOB pairing.CompanionDeviceManagerrelies on the registeredDeviceIdMAC address to target the correct underlying radio link during the cryptographic OOB pairing handshake.
| Parameters | |
|---|---|
bluetoothLe |
boolean: true to request Bluetooth LE out-of-band pairing,
false otherwise. |
| Returns | |
|---|---|
OutOfBandPairingRequest.Builder |
this builder instance.
This value cannot be null. |