# 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)

*** ** * ** ***


```
public final 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 |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_CHEST_STRAP() = 7` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_CONSUMER_MEDICAL_DEVICE() = 9` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_FITNESS_BAND() = 6` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_FITNESS_EQUIPMENT() = 13` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_FITNESS_MACHINE() = 12` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_GLASSES() = 10` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_HEAD_MOUNTED() = 5` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_HEARABLE() = 11` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_METER() = 15` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_PHONE() = 2` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_PORTABLE_COMPUTER() = 14` Requires `androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES`. |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_RING() = 4` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_SCALE() = 3` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_SMART_DISPLAY() = 8` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN() = 0` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#TYPE_WATCH() = 1` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#Device(kotlin.Int,kotlin.String,kotlin.String)(int type, https://developer.android.com/reference/java/lang/String.html manufacturer, https://developer.android.com/reference/java/lang/String.html model)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#getManufacturer()()` an optional client supplied manufacturer of the device |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#getModel()()` an optional client supplied model of the device |
| `final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#getType()()` a client supplied type of the device |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Device#toString()()` |

## Constants

### TYPE_CHEST_STRAP

```
public static final int TYPE_CHEST_STRAP = 7
```

### TYPE_CONSUMER_MEDICAL_DEVICE

```
public static final int TYPE_CONSUMER_MEDICAL_DEVICE = 9
```

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/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_FITNESS_BAND

```
public static final int TYPE_FITNESS_BAND = 6
```

### TYPE_FITNESS_EQUIPMENT

```
public static final int TYPE_FITNESS_EQUIPMENT = 13
```

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/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_FITNESS_MACHINE

```
public static final int TYPE_FITNESS_MACHINE = 12
```

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/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_GLASSES

```
public static final int TYPE_GLASSES = 10
```

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/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_HEAD_MOUNTED

```
public static final int TYPE_HEAD_MOUNTED = 5
```

### TYPE_HEARABLE

```
public static final int TYPE_HEARABLE = 11
```

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/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_METER

```
public static final int TYPE_METER = 15
```

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/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_PHONE

```
public static final int TYPE_PHONE = 2
```

### TYPE_PORTABLE_COMPUTER

```
public static final int TYPE_PORTABLE_COMPUTER = 14
```

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/androidx/health/connect/client/records/metadata/Device#TYPE_UNKNOWN()`.

### TYPE_RING

```
public static final int TYPE_RING = 4
```

### TYPE_SCALE

```
public static final int TYPE_SCALE = 3
```

### TYPE_SMART_DISPLAY

```
public static final int TYPE_SMART_DISPLAY = 8
```

### TYPE_UNKNOWN

```
public static final int TYPE_UNKNOWN = 0
```

### TYPE_WATCH

```
public static final int TYPE_WATCH = 1
```

## Public constructors

### Device

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

```
public Device(int type, String manufacturer, String model)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getManufacturer

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

```
public final String getManufacturer()
```

an optional client supplied manufacturer of the device

### getModel

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

```
public final String getModel()
```

an optional client supplied model of the device

### getType

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

```
public final int getType()
```

a client supplied type of the device

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```