# Device

Artifact: [androidx.health.connect:connect-client](https://developer.android.com/jetpack/androidx/releases/health-connect) [View Source](https://cs.android.com/search?q=file:androidx/health/connect/client/records/metadata/Device.kt+class:androidx.health.connect.client.records.metadata.Device) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***


```
class Device
```

<br />

*** ** * ** ***

A physical device (such as phone, watch, scale, or chest strap) which captured associated health data point.

Device needs to be populated by users of the API. Metadata fields not provided by clients will remain absent.

Some device types are only available on newer versions of Health Connect. See `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES` for more details.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_CHEST_STRAP() = 7` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_CONSUMER_MEDICAL_DEVICE() = 9` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_FITNESS_BAND() = 6` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_FITNESS_EQUIPMENT() = 13` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_FITNESS_MACHINE() = 12` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_GLASSES() = 10` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_HEAD_MOUNTED() = 5` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_HEARABLE() = 11` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_METER() = 15` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_PHONE() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_PORTABLE_COMPUTER() = 14` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_RING() = 4` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_SCALE() = 3` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_SMART_DISPLAY() = 8` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN() = 0` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_WATCH() = 1` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#Device(kotlin.Int,kotlin.String,kotlin.String)(type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, manufacturer: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, model: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#manufacturer()` an optional client supplied manufacturer of the device |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#model()` an optional client supplied model of the device |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#type()` a client supplied type of the device |

## Constants

### TYPE_CHEST_STRAP

```
const val TYPE_CHEST_STRAP = 7: Int
```

### TYPE_CONSUMER_MEDICAL_DEVICE

```
const val TYPE_CONSUMER_MEDICAL_DEVICE = 9: Int
```

Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. If the feature is not available, this device type will be treated as `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_FITNESS_BAND

```
const val TYPE_FITNESS_BAND = 6: Int
```

### TYPE_FITNESS_EQUIPMENT

```
const val TYPE_FITNESS_EQUIPMENT = 13: Int
```

Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. If the feature is not available, this device type will be treated as `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_FITNESS_MACHINE

```
const val TYPE_FITNESS_MACHINE = 12: Int
```

Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. If the feature is not available, this device type will be treated as `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_GLASSES

```
const val TYPE_GLASSES = 10: Int
```

Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. If the feature is not available, this device type will be treated as `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_HEAD_MOUNTED

```
const val TYPE_HEAD_MOUNTED = 5: Int
```

### TYPE_HEARABLE

```
const val TYPE_HEARABLE = 11: Int
```

Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. If the feature is not available, this device type will be treated as `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_METER

```
const val TYPE_METER = 15: Int
```

Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. If the feature is not available, this device type will be treated as `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_PHONE

```
const val TYPE_PHONE = 2: Int
```

### TYPE_PORTABLE_COMPUTER

```
const val TYPE_PORTABLE_COMPUTER = 14: Int
```

Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. If the feature is not available, this device type will be treated as `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_RING

```
const val TYPE_RING = 4: Int
```

### TYPE_SCALE

```
const val TYPE_SCALE = 3: Int
```

### TYPE_SMART_DISPLAY

```
const val TYPE_SMART_DISPLAY = 8: Int
```

### TYPE_UNKNOWN

```
const val TYPE_UNKNOWN = 0: Int
```

### TYPE_WATCH

```
const val TYPE_WATCH = 1: Int
```

## Public constructors

### Device

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
Device(type: Int, manufacturer: String? = null, model: String? = null)
```

## Public functions

### equals

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

### hashCode

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

### toString

```
open fun toString(): String
```

## Public properties

### manufacturer

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
val manufacturer: String?
```

an optional client supplied manufacturer of the device

### model

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
val model: String?
```

an optional client supplied model of the device

### type

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
val type: Int
```

a client supplied type of the device

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`
- `7`
- `8`
- `9`
- `10`
- `11`
- `12`
- `13`
- `14`
- `15`

<br />