Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions) Summary: [Nested Classes](https://developer.android.com/reference/android/health/connect/datatypes/Device#nestedclasses) \| [Constants](https://developer.android.com/reference/android/health/connect/datatypes/Device#constants) \| [Methods](https://developer.android.com/reference/android/health/connect/datatypes/Device#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/health/connect/datatypes/Device#inhmethods)

# Device

*** ** * ** ***


`
public

final

class
Device
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.health.connect.datatypes.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.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/health/connect/datatypes/Device.Builder` |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_CHEST_STRAP` Wearable straps worn around the chest, primarily used for highly accurate heart rate monitoring during exercise. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_CONSUMER_MEDICAL_DEVICE` Over-the-counter Medical devices. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_FITNESS_BAND` Wearable devices, typically worn on the wrist or arm, primarily focused on tracking physical activity and basic health metrics. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_FITNESS_EQUIPMENT` Tools and accessories designed for use during physical exercise. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_FITNESS_MACHINE` Stationary or mobile equipment designed for physical exercise. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_GLASSES` Wearable glasses with integrated technology and computing capabilities. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_HEAD_MOUNTED` Devices worn on the head, beyond glasses, designed for specific health or fitness applications, often involving sensing or stimulation. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_HEARABLE` Electronic devices worn in or around the ears, often with audio capabilities. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_METER` Equipment attachments that measure a specific metric. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_PHONE` A handheld mobile computing and communication device, equipped with various sensors (e.g., accelerometer, GPS) that can collect health and fitness data, or serve as a primary interface for manual data entry or managing data from connected peripherals. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_PORTABLE_COMPUTER` A portable computer usually with GPS and performance tracking capabilities that is either handheld or attached to a device. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_RING` Wearable devices worn on a finger, typically designed for discreet tracking of sleep, activity, and potentially other physiological data. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_SCALE` Devices designed to measure body weight and often other body composition metrics. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_SMART_DISPLAY` Stationary devices with a screen and connectivity, often used in homes or gyms to provide guided workouts, track progress, and offer health-related information. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_UNKNOWN` A device whose specific type is not identified, not yet supported in the Health Connect list, or where the originating device type could not be determined by the data writer. |
| `int` | `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_WATCH` A wearable computing device designed to be worn on the wrist, typically featuring an interactive display and offering a broad range of functionalities including, but not limited to, health and fitness tracking, app integration, and communication. |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/health/connect/datatypes/Device#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object object) ` Indicates whether some other object is "equal to" this one. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/health/connect/datatypes/Device#getDisplayName()() ` |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/health/connect/datatypes/Device#getManufacturer()() ` |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/health/connect/datatypes/Device#getModel()() ` |
| ` int` | ` https://developer.android.com/reference/android/health/connect/datatypes/Device#getType()() ` |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/health/connect/datatypes/Device#getUdi()() ` Returns the UDI (Unique Device Identifier), a unique numeric or alphanumeric code assigned to a medical device, of this `https://developer.android.com/reference/android/health/connect/datatypes/Device` instance. |
| ` int` | ` https://developer.android.com/reference/android/health/connect/datatypes/Device#hashCode()() ` Returns a hash code value for the object. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### DEVICE_TYPE_CHEST_STRAP

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_CHEST_STRAP
```

Wearable straps worn around the chest, primarily used for highly accurate heart rate
monitoring during exercise.

<br />

Constant Value:

7
(0x00000007)


### DEVICE_TYPE_CONSUMER_MEDICAL_DEVICE

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [U Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_CONSUMER_MEDICAL_DEVICE
```

Over-the-counter Medical devices.

For example: CGM / Glucometers, Blood Pressure Cuff

<br />

Constant Value:

9
(0x00000009)


### DEVICE_TYPE_FITNESS_BAND

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_FITNESS_BAND
```

Wearable devices, typically worn on the wrist or arm, primarily focused on tracking physical
activity and basic health metrics.

<br />

Constant Value:

6
(0x00000006)


### DEVICE_TYPE_FITNESS_EQUIPMENT

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [U Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_FITNESS_EQUIPMENT
```

Tools and accessories designed for use during physical exercise.

For example: Dumbbells, Jump Ropes

<br />

Constant Value:

13
(0x0000000d)


### DEVICE_TYPE_FITNESS_MACHINE

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [U Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_FITNESS_MACHINE
```

Stationary or mobile equipment designed for physical exercise.

For example: Treadmill, Indoor Cycles, Rowing Machines, Outdoor Bicycle. Outdoor Scooter

<br />

Constant Value:

12
(0x0000000c)


### DEVICE_TYPE_GLASSES

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [U Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_GLASSES
```

Wearable glasses with integrated technology and computing capabilities.

<br />

Constant Value:

10
(0x0000000a)


### DEVICE_TYPE_HEAD_MOUNTED

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_HEAD_MOUNTED
```

Devices worn on the head, beyond glasses, designed for specific health or fitness
applications, often involving sensing or stimulation.

For example: VR/MR Headsets, ECG Head Bands

<br />

Constant Value:

5
(0x00000005)


### DEVICE_TYPE_HEARABLE

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [U Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_HEARABLE
```

Electronic devices worn in or around the ears, often with audio capabilities.

<br />

Constant Value:

11
(0x0000000b)


### DEVICE_TYPE_METER

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [U Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_METER
```

Equipment attachments that measure a specific metric.

For example: Pedal Meters, Insole Meters

<br />

Constant Value:

15
(0x0000000f)


### DEVICE_TYPE_PHONE

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_PHONE
```

A handheld mobile computing and communication device, equipped with various sensors (e.g.,
accelerometer, GPS) that can collect health and fitness data, or serve as a primary interface
for manual data entry or managing data from connected peripherals.

<br />

Constant Value:

2
(0x00000002)


### DEVICE_TYPE_PORTABLE_COMPUTER

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [U Extensions 19](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_PORTABLE_COMPUTER
```

A portable computer usually with GPS and performance tracking capabilities that is either
handheld or attached to a device.

For example: Handheld GPS, Cycling Computer, Rowing Computer

<br />

Constant Value:

14
(0x0000000e)


### DEVICE_TYPE_RING

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_RING
```

Wearable devices worn on a finger, typically designed for discreet tracking of sleep,
activity, and potentially other physiological data.

<br />

Constant Value:

4
(0x00000004)


### DEVICE_TYPE_SCALE

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_SCALE
```

Devices designed to measure body weight and often other body composition metrics.

<br />

Constant Value:

3
(0x00000003)


### DEVICE_TYPE_SMART_DISPLAY

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_SMART_DISPLAY
```

Stationary devices with a screen and connectivity, often used in homes or gyms to provide
guided workouts, track progress, and offer health-related information.

For example: Home Smart Displays, Interactive Fitness Mirrors

<br />

Constant Value:

8
(0x00000008)


### DEVICE_TYPE_UNKNOWN

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_UNKNOWN
```

A device whose specific type is not identified, not yet supported in the Health Connect list,
or where the originating device type could not be determined by the data writer.

<br />

Constant Value:

0
(0x00000000)


### DEVICE_TYPE_WATCH

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public static final int DEVICE_TYPE_WATCH
```

A wearable computing device designed to be worn on the wrist, typically featuring an
interactive display and offering a broad range of functionalities including, but not limited
to, health and fitness tracking, app integration, and communication.

<br />

Constant Value:

1
(0x00000001)


## Public methods

### equals

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object object)
```

Indicates whether some other object is "equal to" this one.

<br />

| Parameters ||
|---|---|
| `object` | `Object`: the reference object with which to compare. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj <br /> |

### getDisplayName

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 22](https://developer.android.com/sdkExtensions)

```
public String getDisplayName ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The display name if set, null otherwise <br /> |

### getManufacturer

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public String getManufacturer ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The device manufacturer if set, null otherwise <br /> |

### getModel

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public String getModel ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The device model if set, null otherwise <br /> |

### getType

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 7](https://developer.android.com/sdkExtensions)

```
public int getType ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The device type if set `DEVICE_TYPE_UNKNOWN` otherwise. Value is one of the following: - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_UNKNOWN` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_WATCH` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_PHONE` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_SCALE` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_RING` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_HEAD_MOUNTED` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_FITNESS_BAND` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_CHEST_STRAP` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_SMART_DISPLAY` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_CONSUMER_MEDICAL_DEVICE` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_GLASSES` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_HEARABLE` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_FITNESS_MACHINE` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_FITNESS_EQUIPMENT` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_PORTABLE_COMPUTER` - `https://developer.android.com/reference/android/health/connect/datatypes/Device#DEVICE_TYPE_METER` |

### getUdi

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)  
Also in [U Extensions 23](https://developer.android.com/sdkExtensions)

```
public String getUdi ()
```

Returns the UDI (Unique Device Identifier), a unique numeric or alphanumeric code assigned to
a medical device, of this `https://developer.android.com/reference/android/health/connect/datatypes/Device` instance.

The identifier is entirely "self-declared" by the device or app writing the data. Health
Connect acts as a passive data store; it does not cross-reference this ID against the FDA's
GUDID database or any other regulatory registry to ensure the device is legitimate. The
presence of a UDI indicates that the data source is a Registered Medical Device. However, it
does not guarantee specific FDA Clearance or Approval. Data Readers should use the UDI to
query the GUDID database if they need to filter by Regulatory Class (I, II, or III) or
intended use.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The device Unique Device Identifier (UDI) if set, null otherwise. <br /> |

### hashCode

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for the object.

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |