Before proceeding with account authorization, make sure that you have:

1. The Google Home app (GHA) installed on your Android mobile device, set up with at least one home (structure) on your Google Account.
2. At least one of these supported device types for the Sample App in the home:
   - Color Temperature Light (on and off, brightness)
   - Contact Sensor (boolean state)
   - Dimmable Light (on and off, brightness)
   - Extended Color Light (on and off, brightness)
   - Generic Switch
   - Google Camera
   - Occupancy Sensor (occupancy sensing)
   - On/Off Light (on and off, brightness)
   - On/Off Light Switch
   - On/Off Plug-in Unit (on and off)
   - On/Off Sensor
3. Two devices for testing the sample automation.

Prior to using devices through the Home APIs, they must controllable from
GHA.

## Run the Android Sample App

Run the Android Sample App. The first time running it, you'll be asked to allow
access to a home on your Google Account. This grants the Sample App permission
to access and control the structures and devices in that home.

The app's default permission behavior will differ depending on
whether or not the app was registered on the Google Home Developer Console.
| **Important:** The Google Home Developer Console is not yet available for registration.

**If an app is not registered in the Developer Console** , it will be in
an *unverified* state. This is recommended for testing use of the Home APIs:

- Only users [registered as test users in the OAuth
  console](https://developers.home.google.com/apis/android/oauth#consent) can grant
  permissions for the app. There is a limit of 100 test users for an unverified
  app.

- An unverified app will have access to devices of any device types that are
  supported by OAuth for the Home APIs (the list of device types in the
  Developer Console). All devices in a structure will be granted.

**If
an app is registered in the Developer Console** and
has been approved for access to one or more device types, and [brand
verification has been completed for
OAuth](https://developers.google.com/identity/protocols/oauth2/production-readiness/brand-verification),
it will be in a *verified* state. This state is required for launching an app to
production:

- Test user limits no longer apply. Any user can grant permission to the app.
- The user can only grant permission to the device types that were approved in the Developer Console.

Tap **Allow access to a chosen home**:

- If there are any homes connected to your account, choose a home to grant permission to. If no devices are found in the chosen home, you can either:
  1. Tap **Allow access to another home** to select a different home.
  2. Set up a device of your choosing in that home using the Google Home app (GHA). Remember, only these device types have support for control in this Sample App:
     - Color Temperature Light (on and off, brightness)
     - Contact Sensor (boolean state)
     - Dimmable Light (on and off, brightness)
     - Extended Color Light (on and off, brightness)
     - Generic Switch
     - Google Camera
     - Occupancy Sensor (occupancy sensing)
     - On/Off Light (on and off, brightness)
     - On/Off Light Switch
     - On/Off Plug-in Unit (on and off)
     - On/Off Sensor
- If there are no homes connected to your account, you will get a screen with a message of **There are no structures for the selected account.**
  1. Swipe back to return to the main Sample App view.
  2. To set up a home, use the GHA. Then attempt to grant permission to the Sample App again.

The permissions flow can be revisited at any time by selecting the profile icon
account_circle in the upper-right of any
Sample App screen.  
![Selecting a structure in which to run the Sample App.](https://developers.home.google.com/static/apis/images/sample-app-auth-flow-select-structure.png) *Figure 1*: Select a structure ![The selected structure, showing available devices.](https://developers.home.google.com/static/apis/images/sample-app-auth-flow-structure-and-devices.png) *Figure 2*: Structure and devices ![Control settings for a device.](https://developers.home.google.com/static/apis/images/sample-app-auth-flow-device-control-screen.png) *Figure 3*: Device controls ![The selected structure, showing available automations.](https://developers.home.google.com/static/apis/images/sample-app-auth-flow-structure-and-automations.png) *Figure 4*: Structure and automations

Once you have successfully granted permission to a home that features devices,
you will be taken to the devices view. You can control the devices and observe
their state changes through the Sample App.