# SharedDeviceData


```
class SharedDeviceData : Parcelable
```

<br />

*** ** * ** ***

Class which provides a type-safe interpretation of the `https://developer.android.com/reference/android/content/Intent.html` that will be delivered when an application is selected from the share-sheet shown via `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)`.

The `https://developer.android.com/reference/android/app/Activity.html` component which is registered for the action:

android:name="com.google.android.gms.home.matter.ACTION_COMMISSION_DEVICE"

will receive an `https://developer.android.com/reference/android/content/Intent.html` which can be parsed via `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#fromIntent(android.content.Intent)`. If the `https://developer.android.com/reference/android/content/Intent.html` is missing information (which should not be the case for `https://developer.android.com/reference/android/content/Intent.html`s received from the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient` APIs), then an `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData.InvalidSharedDeviceDataException` will be thrown.

## Summary

| ### Nested types |
|---|
| `class https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData.Builder` A builder for `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData` instances. |
| `class https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData.InvalidSharedDeviceDataException : https://developer.android.com/reference/java/lang/Exception.html` Exception thrown when parsing an `https://developer.android.com/reference/android/content/Intent.html` to retrieved a `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData`, if the given `https://developer.android.com/reference/android/content/Intent.html` is missing required data or is malformed. |

| ### 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/commissioning/SharedDeviceData#EXTRA_COMMISSIONING_WINDOW_EXPIRATION() = "com.google.android.gms.home.matter.EXTRA_COMMISSIONING_WINDOW_EXPIRATION"` Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getCommissioningWindowExpirationMillis()` value. |
| `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/commissioning/SharedDeviceData#EXTRA_DEVICE_NAME() = "com.google.android.gms.home.matter.EXTRA_DEVICE_NAME"` Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getDeviceName()` value. |
| `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/commissioning/SharedDeviceData#EXTRA_DEVICE_TYPE() = "com.google.android.gms.home.matter.EXTRA_DEVICE_TYPE"` **This property is deprecated.** this field is not expected to be populated; the vendor ID and product ID can be used to map to a device type <br /> |
| `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/commissioning/SharedDeviceData#EXTRA_MANUAL_PAIRING_CODE() = "com.google.android.gms.home.matter.EXTRA_MANUAL_PAIRING_CODE"` Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getManualPairingCode()` value. |
| `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/commissioning/SharedDeviceData#EXTRA_PRODUCT_ID() = "com.google.android.gms.home.matter.EXTRA_PRODUCT_ID"` Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getProductId()` value. |
| `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/commissioning/SharedDeviceData#EXTRA_ROOM_NAME() = "com.google.android.gms.home.matter.EXTRA_ROOM_NAME"` Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getRoomName()` value. |
| `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/commissioning/SharedDeviceData#EXTRA_VENDOR_ID() = "com.google.android.gms.home.matter.EXTRA_VENDOR_ID"` Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getVendorId()` value. |

| ### Public functions |
|---|---|
| `java-static https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData.Builder!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#builder(java.lang.String)(manualPairingCode: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!)` Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData.Builder` with the given `manualPairingCode` set. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#equals(java.lang.Object)(other: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?)` |
| `java-static https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#fromIntent(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html!)` Returns a `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData` parsed from the given `intent`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#hashCode()()` |
| `https://developer.android.com/reference/android/content/Intent.html!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#toIntent()()` Converts this `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData` instance into an `https://developer.android.com/reference/android/content/Intent.html` that can be parsed into an equivalent instance as `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#fromIntent(android.content.Intent)`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#toString()()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#writeToParcel(android.os.Parcel,int)(dest: https://developer.android.com/reference/android/os/Parcel.html!, flags: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#commissioningWindowExpirationMillis()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#deviceName()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#deviceType()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#manualPairingCode()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#productId()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#roomName()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#vendorId()` |

### Inherited Constants

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR = 1` `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE = 1`

### Inherited functions

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/os/Parcelable.html#describeContents()()`

## Constants

### EXTRA_COMMISSIONING_WINDOW_EXPIRATION

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

Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getCommissioningWindowExpirationMillis()` value.

Intent extra type: Long

### EXTRA_DEVICE_NAME

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

Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getDeviceName()` value.

Intent extra type: String

### EXTRA_DEVICE_TYPE

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

> [!CAUTION]
> **This property is deprecated.**   
>
> this field is not expected to be populated; the vendor ID and product ID can be used to map to a device type

Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getDeviceType()` value.

Intent extra type: Integer

### EXTRA_MANUAL_PAIRING_CODE

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

Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getManualPairingCode()` value.

Intent extra type: String.

### EXTRA_PRODUCT_ID

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

Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getProductId()` value.

Intent extra type: Integer

### EXTRA_ROOM_NAME

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

Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getRoomName()` value.

Intent extra type: String

### EXTRA_VENDOR_ID

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

Intent extra key for the result of `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` to retrieve the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#getVendorId()` value.

Intent extra type: Integer

## Public functions

### builder

```
java-static fun builder(manualPairingCode: String!): SharedDeviceData.Builder!
```

Returns a new `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData.Builder` with the given `manualPairingCode` set.

### equals

```
fun equals(other: Any?): Boolean
```

### fromIntent

```
java-static fun fromIntent(intent: Intent!): SharedDeviceData!
```

Returns a `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData` parsed from the given `intent`.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html!` | the intent data returned as a result from an `https://developer.android.com/reference/android/content/IntentSender.html` started for result from the `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/CommissioningClient#shareDevice(com.google.android.gms.home.matter.commissioning.ShareDeviceRequest)` API |

| Throws |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData.InvalidSharedDeviceDataException` | if `intent` was malformed or missing required data |

### hashCode

```
fun hashCode(): Int
```

### toIntent

```
fun toIntent(): Intent!
```

Converts this `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData` instance into an `https://developer.android.com/reference/android/content/Intent.html` that can be parsed into an equivalent instance as `https://developers.home.google.com/reference/kotlin/com/google/android/gms/home/matter/commissioning/SharedDeviceData#fromIntent(android.content.Intent)`.

### toString

```
fun toString(): String!
```

### writeToParcel

```
fun writeToParcel(dest: Parcel!, flags: Int): Unit
```

## Public properties

### commissioningWindowExpirationMillis

```
val commissioningWindowExpirationMillis: Long
```

### deviceName

```
val deviceName: String!
```

### deviceType

```
val deviceType: Int
```

### manualPairingCode

```
val manualPairingCode: String!
```

### productId

```
val productId: Int
```

### roomName

```
val roomName: String?
```

### vendorId

```
val vendorId: Int
```