# CommissioningRequest.Builder

public static interface **CommissioningRequest.Builder** Builder for constructing a `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest` instance.

### Public Method Summary

|---|---|
| abstract [CommissioningRequest](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest) | [build](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder#build())() Builds the request as configured in this builder. |
| abstract [CommissioningRequest.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder) | [setCommissioningService](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder#setCommissioningService(android.content.ComponentName))([ComponentName](https://developer.android.com/reference/android/content/ComponentName.html) commissioningService) Set the `https://developer.android.com/reference/android/content/ComponentName.html` of an exported service which will return a `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningService` in its `https://developer.android.com/reference/android/app/Service.html#onBind(android.content.Intent)` implementation. |
| abstract [CommissioningRequest.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder) | [setDeviceInfo](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder#setDeviceInfo(com.google.android.gms.home.matter.commissioning.DeviceInfo))([DeviceInfo](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/DeviceInfo) deviceInfo) Sets the information about the target device to be commissioned, if known. |
| abstract [CommissioningRequest.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder) | [setDeviceNameHint](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder#setDeviceNameHint(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) deviceNameHint) Sets a suggested name for the device, which will be shown to the user after commissioning completes, and the chosen value will be returned in `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningResult`. |
| abstract [CommissioningRequest.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder) | [setOnboardingPayload](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder#setOnboardingPayload(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) onboardingPayload) Sets the onboarding payload for the target device. |

## Public Methods

#### public abstract [CommissioningRequest](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest) **build**
()

Builds the request as configured in this builder.

#### public abstract [CommissioningRequest.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder) **setCommissioningService** ([ComponentName](https://developer.android.com/reference/android/content/ComponentName.html) commissioningService)

Set the `https://developer.android.com/reference/android/content/ComponentName.html`
of an exported service which will return a `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningService` in its `https://developer.android.com/reference/android/app/Service.html#onBind(android.content.Intent)` implementation.

#### public abstract [CommissioningRequest.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder) **setDeviceInfo** ([DeviceInfo](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/DeviceInfo) deviceInfo)

Sets the information about the target device to be commissioned, if known. For
example, if you already know the device's vendor/product ID and discriminator, it can
be provided here to restrict which device should be set up in the flow.

If not set, then a user can commission any Matter device.

#### public abstract [CommissioningRequest.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder) **setDeviceNameHint** ([String](https://developer.android.com/reference/java/lang/String.html) deviceNameHint)

Sets a suggested name for the device, which will be shown to the user after
commissioning completes, and the chosen value will be returned in `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningResult`. This can be used in lieu of providing a commissioning
service, if only a name suggestion is desired. If both are provided, the callback will
still be queried for a name suggestion, but this hint will be used as a fallback if
your callback does not return a suggestion.

#### public abstract [CommissioningRequest.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder) **setOnboardingPayload** ([String](https://developer.android.com/reference/java/lang/String.html) onboardingPayload)

Sets the onboarding payload for the target device. This should be used if you
already have established proof of possession, either via a manual pairing code, NFC
tag, or QR code scan.

If set, the user will not be required to scan the QR code, NFC tag, or enter a code
to initiate commissioning.

Note that the device information in this payload takes precedence over any
information provided in `https://developers.home.google.com/android/reference/com/google/android/gms/home/matter/commissioning/CommissioningRequest.Builder#setDeviceInfo(com.google.android.gms.home.matter.commissioning.DeviceInfo)`.

##### Parameters

| onboardingPayload | the text contents of the payload (e.g. QR code string or manual pairing code) |
|---|---|