Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions) Summary: [Ctors](https://developer.android.com/reference/android/companion/OutOfBandPairingRequest.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/companion/OutOfBandPairingRequest.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/companion/OutOfBandPairingRequest.Builder#inhmethods)

# OutOfBandPairingRequest.Builder

*** ** * ** ***


`
public
static
final

class
OutOfBandPairingRequest.Builder
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.companion.OutOfBandPairingRequest.Builder |

<br />

*** ** * ** ***

A builder for creating `https://developer.android.com/reference/android/companion/OutOfBandPairingRequest`.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/companion/OutOfBandPairingRequest.Builder#Builder()() ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/companion/OutOfBandPairingRequest` | ` https://developer.android.com/reference/android/companion/OutOfBandPairingRequest.Builder#build()() ` Builds the `https://developer.android.com/reference/android/companion/OutOfBandPairingRequest` object. |
| ` https://developer.android.com/reference/android/companion/OutOfBandPairingRequest.Builder` | ` https://developer.android.com/reference/android/companion/OutOfBandPairingRequest.Builder#setBluetoothLe(boolean)(boolean bluetoothLe) ` Sets whether Bluetooth Low Energy (LE) out-of-band (OOB) pairing is requested. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Public constructors

### Builder

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public Builder ()
```

<br />

<br />

## Public methods

### build

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public OutOfBandPairingRequest build ()
```

Builds the `https://developer.android.com/reference/android/companion/OutOfBandPairingRequest` object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/companion/OutOfBandPairingRequest` | This value cannot be `null`. <br /> |

### setBluetoothLe

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
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 `https://developer.android.com/reference/android/companion/CompanionDeviceManager` operates 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 `https://developer.android.com/reference/android/companion/CompanionDeviceManager#createAndSetDeviceId(int,%20android.companion.DeviceId)` before starting Bluetooth OOB pairing. `https://developer.android.com/reference/android/companion/CompanionDeviceManager` relies on the registered `https://developer.android.com/reference/android/companion/DeviceId` MAC address to target the correct underlying radio link during the cryptographic OOB pairing handshake.

<br />

<br />

| Parameters ||
|---|---|
| `bluetoothLe` | `boolean`: `true` to request Bluetooth LE out-of-band pairing, `false` otherwise. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/companion/OutOfBandPairingRequest.Builder` | this builder instance. This value cannot be `null`. <br /> |