The commissioning flow in your app using the Commissioning API can be
initiated two ways: directly in your app, or through an app picker in the Fast
Pair process. This section covers the user experience (UX) for each.

## Initiated by the app

In this scenario, the user starts commissioning in your app,
typically from a call-to-action (CTA) of "Add Device". We recommend featuring
the **Add Device** button as follows:

- Where users see all of their devices, like a **Controls** page
- Where users can manage the home, like a **Settings** page
- The **Home** page of your app

When commissioning is complete, we recommend landing the user at the Home page
of the app, or at location in the app that either shows the user the device
controller they just set up or show a full list of all devices, including the
device that was just set up.

The UX is illustrated in Figure 2:
- ![App-Initiated Commissioning (Step 1)](https://developers.home.google.com/static/apis/images/app-initiated-commissioning-flow-01.png)

  The user of the app clicks add **Add device**.
- ![App-Initiated Commissioning (Step 2)](https://developers.home.google.com/static/apis/images/app-initiated-commissioning-flow-02.png)

  The user scans the QR code or enters the
  pairing code.
- ![App-Initiated Commissioning (Step 3)](https://developers.home.google.com/static/apis/images/app-initiated-commissioning-flow-03.png)

  The user is prompted to agree to add the device
  to the Google fabric (this corresponds to "Consent + Metadata" in Figure
  1) and to select the Google Account to use.
- ![App-Initiated Commissioning (Step 4)](https://developers.home.google.com/static/apis/images/app-initiated-commissioning-flow-04.png)

  If the user has more than one Home, they're
  prompted to select a Home. If they don't have a Home set up, a Home named
  "Home" is automatically created.
- ![App-Initiated Commissioning (Step 5)](https://developers.home.google.com/static/apis/images/app-initiated-commissioning-flow-05.png)

  The Commissioning API connects to the device.
- ![App-Initiated Commissioning (Step 6)](https://developers.home.google.com/static/apis/images/app-initiated-commissioning-flow-07.png)

  The user is prompted to select the room where the
  device is located.
- ![App-Initiated Commissioning (Step 8)](https://developers.home.google.com/static/apis/images/app-initiated-commissioning-flow-09.png)

  The user is prompted to rename the device.
- ![App-Initiated Commissioning (Step 10)](https://developers.home.google.com/static/apis/images/app-initiated-commissioning-flow-10.png)

  The Commissioning API generates
  Matter credentials, checks network connectivity, then
  executes the commissioning process, connecting the device to the chosen
  fabric.
- ![App-Initiated Commissioning (Step 11)](https://developers.home.google.com/static/apis/images/app-initiated-commissioning-flow-11.png)

  If permission to the user's structure and
  devices have already been given, the device should appear in the Home
  along with other devices in that Home, and may be controlled using the
  app.

  If permission to the user's structure and
  devices have not yet been given, the device shouldn't be visible or
  controllable in the app yet. [Permission is required](https://developers.home.google.com/apis/initialization) for accessing and controlling the device
  in an app.
**Figure 2**: App-initiated Commissioning

## Initiated by Fast Pair

Commissioning can also be initiated using Fast Pair in Android. After scanning
the device's Matter QR code, the user is prompted to select
an app to continue the commissioning process. Selecting your app utilizes the
Commissioning API from the app, as illustrated in Figure 3.

If the user does not have the app installed on their mobile device, they are
prompted to install prior to continuing. The UX from the consent screen
onwards is the same as that in Figure 2.
- ![Fast-Pair Commissioning (Step 1)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-01.png)

  The user is prompted to scan a QR code.
- ![Fast-Pair Commissioning (Step 2)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-02.png)

  The user scans the device's Matter QR code.
- ![Fast-Pair Commissioning (Step 3)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-03.png)

  The user is prompted to select an app to
  continue the
  commissioning process.
- ![Fast-Pair Commissioning (Step 4)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-04.png)

  If the app isn't already installed, the user is
  prompted to install it.
- ![Fast-Pair Commissioning (Step 5)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-05.png)

  The app downloads from the Google Play Store.
- ![Fast-Pair Commissioning (Step 6)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-06.png)

  The app is installed.
- ![Fast-Pair Commissioning (Step 7)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-07.png)

  Once the app is successfully installed, the user
  is prompted to continue.
- ![Fast-Pair Commissioning (Step 8)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-08.png)

  The user is prompted to agree to add the device
  to the Google fabric (this corresponds to "Consent + Metadata" in Figure
  1) and to select the Google Account to use.
- ![Fast-Pair Commissioning (Step 9)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-09.png)

  If the user has more than one Home, they're
  prompted to select a Home. If they don't have a Home set up, a Home named
  "Home" is automatically created.
- ![Fast-Pair Commissioning (Step 10)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-10.png)

  The Commissioning API connects to the device.
- ![Fast-Pair Commissioning (Step 11)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-11.png)

  The user is prompted to select the room where the
  device is located.
- ![Fast-Pair Commissioning (Step 13)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-13.png)

  The user is prompted to rename the device.
- ![Fast-Pair Commissioning (Step 15)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-15.png)

  The Commissioning API generates Matter
  credentials, checks network connectivity, then executes the commissioning
  process, connecting the device to the chosen fabric.
- ![Fast-Pair Commissioning (Step 16)](https://developers.home.google.com/static/apis/images/fast-pair-commissioning-flow-16.png)

  If permission to the user's structure and devices
  have already been given, the device should appear in the Home along with
  other devices in that Home, and may be controlled using the app.

  If permission to the user's structure and devices
  have not yet been given, the device shouldn't be visible or controllable
  in the app yet. [Permission is required](https://developers.home.google.com/apis/initialization) for
  accessing and controlling the device in an app.
**Figure 3**: Fast-Pair Commissioning

## App picker

![A view of the app picker showing two apps to choose from](https://developers.home.google.com/static/matter/apis/images/app-picker.png)

![](https://developers.home.google.com/static/matter/apis/images/app-picker.png)

There are two ways your app appears in the app picker during the commissioning
process:

1. On the **Choose an app** screen.
2. If users select **Choose other app** , it will show on the **Other Installed
   Apps** screen.

### Suggested Apps

The app picker displays two suggested apps.

- The first is always Google Home app (GHA).
- The second is for the preferred app of the device maker, if it is defined in a Google Home Developer Console project associated with the VID or PID of the device. (This option does not apply to app developers who don't build Matter devices.) ![Device maker preferred commissioner app](https://developers.home.google.com/static/matter/apis/images/device-maker-preferred-commissioner-app.png)

There are two scenarios when the apps are on the **Choose an app** screen.

1. **Installed** - Google Play services check that the application supports the `ACTION_COMMISSION_DEVICE` intent filter. If the intent filter is missing the user is directed to the Play store to update the app.
2. **Not Installed** - The user is directed to the Play store to install the app before continuing.