# Matter

# Matter


```
class Matter
```

<br />

*** ** * ** ***

Entry point for Matter APIs.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#ACTION_COMMISSION_DEVICE() = "com.google.android.gms.home.matter.ACTION_COMMISSION_DEVICE"` `https://developer.android.com/reference/android/content/Intent.html` action used to share `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData` when an application is chosen from `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)`. |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#ACTION_START_COMMISSIONING() = "com.google.android.gms.home.matter.ACTION_START_COMMISSIONING"` Intent action to start a Matter commissioning flow. |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#EXTRA_ONBOARDING_PAYLOAD() = "com.google.android.gms.home.matter.EXTRA_ONBOARDING_PAYLOAD"` Intent extra for the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#ACTION_START_COMMISSIONING()` action which allows specification of an (optional) onboarding payload (manual pairing code or QR code string). |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#EXTRA_PRODUCT_ID() = "com.google.android.gms.home.matter.EXTRA_PRODUCT_ID"` Intent extra for the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#ACTION_START_COMMISSIONING()` action which allows specification of the Matter product ID of the device to be commissioned. |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#EXTRA_VENDOR_ID() = "com.google.android.gms.home.matter.EXTRA_VENDOR_ID"` Intent extra for the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#ACTION_START_COMMISSIONING()` action which allows specification of the Matter vendor ID of the device to be commissioned. |

| ### Public functions |
|---|---|
| `java-static https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#getCommissioningClient(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html!)` Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient`. |
| `java-static https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#getCommissioningClient(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html!)` Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient`. |
| `java-static https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/DiscoveryClient!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#getDiscoveryClient(android.app.Activity)(activity: https://developer.android.com/reference/android/app/Activity.html!)` Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/DiscoveryClient`. |
| `java-static https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/DiscoveryClient!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#getDiscoveryClient(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html!)` Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/DiscoveryClient`. |
| `java-static https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/settings/SettingsClient!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#getSettingsClient(android.app.Activity,com.google.android.gms.auth.api.signin.GoogleSignInAccount)(activity: https://developer.android.com/reference/android/app/Activity.html!, account: https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInAccount.html?)` Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/settings/SettingsClient`. |
| `java-static https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/settings/SettingsClient!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#getSettingsClient(android.content.Context,com.google.android.gms.auth.api.signin.GoogleSignInAccount)(context: https://developer.android.com/reference/android/content/Context.html!, account: https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInAccount.html?)` Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/settings/SettingsClient`. |

## Constants

### ACTION_COMMISSION_DEVICE

```
const val ACTION_COMMISSION_DEVICE = "com.google.android.gms.home.matter.ACTION_COMMISSION_DEVICE": String!
```

`https://developer.android.com/reference/android/content/Intent.html` action used to share `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData` when an application is chosen from `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)`.

Upon receiving this `https://developer.android.com/reference/android/content/Intent.html` from Google Play Services, you can retrieve the device information from the `https://developer.android.com/reference/android/content/Intent.html` using `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#fromIntent(android.content.Intent)`.

### ACTION_START_COMMISSIONING

```
const val ACTION_START_COMMISSIONING = "com.google.android.gms.home.matter.ACTION_START_COMMISSIONING": String!
```

Intent action to start a Matter commissioning flow. This can be used if you have no interest in adding your own fabric to the device, or in receiving a result of success or failure, but simply want to direct the user to a setup flow that will allow them to choose a destination application.

Note that if your application registers an IntentFilter for `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#ACTION_COMMISSION_DEVICE()`, then your application will be listed as a potential destination application.

### EXTRA_ONBOARDING_PAYLOAD

```
const val EXTRA_ONBOARDING_PAYLOAD = "com.google.android.gms.home.matter.EXTRA_ONBOARDING_PAYLOAD": String!
```

Intent extra for the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#ACTION_START_COMMISSIONING()` action which allows specification of an (optional) onboarding payload (manual pairing code or QR code string). If this is not specified, then the user will be asked to scan the QR code or enter a manual pairing code.

Supported values are the 11-digit manual pairing code, 21-digit manual pairing code, or the raw text of the Matter QR code (including MT: prefix). If an invalid value is received, the QR code scanner will be shown.

Intent extra type: String

### EXTRA_PRODUCT_ID

```
const val EXTRA_PRODUCT_ID = "com.google.android.gms.home.matter.EXTRA_PRODUCT_ID": String!
```

Intent extra for the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#ACTION_START_COMMISSIONING()` action which allows specification of the Matter product ID of the device to be commissioned. If the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#EXTRA_ONBOARDING_PAYLOAD()` is provided as a manual pairing code, this should be included to indicate the type of device.

If this is specified then `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#EXTRA_VENDOR_ID()` must also be specified.

Intent extra type: Integer

### EXTRA_VENDOR_ID

```
const val EXTRA_VENDOR_ID = "com.google.android.gms.home.matter.EXTRA_VENDOR_ID": String!
```

Intent extra for the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#ACTION_START_COMMISSIONING()` action which allows specification of the Matter vendor ID of the device to be commissioned. If the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#EXTRA_ONBOARDING_PAYLOAD()` is provided as a manual pairing code, this should be included to indicate the type of device.

If this is specified then `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/Matter#EXTRA_PRODUCT_ID()` must also be specified.

Intent extra type: Integer

## Public functions

### getCommissioningClient

```
java-static fun getCommissioningClient(activity: Activity!): CommissioningClient!
```

Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient`.

### getCommissioningClient

```
java-static fun getCommissioningClient(context: Context!): CommissioningClient!
```

Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient`.

### getDiscoveryClient

```
java-static fun getDiscoveryClient(activity: Activity!): DiscoveryClient!
```

Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/DiscoveryClient`.

### getDiscoveryClient

```
java-static fun getDiscoveryClient(context: Context!): DiscoveryClient!
```

Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/discovery/DiscoveryClient`.

### getSettingsClient

```
java-static fun getSettingsClient(activity: Activity!, account: GoogleSignInAccount?): SettingsClient!
```

Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/settings/SettingsClient`.

### getSettingsClient

```
java-static fun getSettingsClient(context: Context!, account: GoogleSignInAccount?): SettingsClient!
```

Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/settings/SettingsClient`.