# HeightRecord

# HeightRecord

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/HeightRecord.kt+class:androidx.health.connect.client.records.HeightRecord)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/health/connect/client/records/HeightRecord "View this page in Java")

<br />

```
class HeightRecord : Record
```

<br />

*** ** * ** ***

Captures the user's height.

## Summary

|                                                                                                   ### Public companion properties                                                                                                    |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AggregateMetric](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregateMetric)`<`[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`>` | [HEIGHT_AVG](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/HeightRecord#HEIGHT_AVG()) Metric identifier to retrieve the average height from[androidx.health.connect.client.aggregate.AggregationResult](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregationResult). |
| [AggregateMetric](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregateMetric)`<`[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`>` | [HEIGHT_MAX](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/HeightRecord#HEIGHT_MAX()) Metric identifier to retrieve the maximum height from[androidx.health.connect.client.aggregate.AggregationResult](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregationResult). |
| [AggregateMetric](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregateMetric)`<`[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`>` | [HEIGHT_MIN](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/HeightRecord#HEIGHT_MIN()) Metric identifier to retrieve minimum height from[androidx.health.connect.client.aggregate.AggregationResult](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregationResult).     |

|                                                                                                                                                                                                                                                                                                                                                     ### Public constructors                                                                                                                                                                                                                                                                                                                                                      |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [HeightRecord](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/HeightRecord#HeightRecord(java.time.Instant,java.time.ZoneOffset,androidx.health.connect.client.units.Length,androidx.health.connect.client.records.metadata.Metadata))`(` ` time: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`,` ` zoneOffset: `[ZoneOffset](https://developer.android.com/reference/java/time/ZoneOffset.html)`?,` ` height: `[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`,` ` metadata: `[Metadata](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Metadata) `)` |

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

|                                                   ### Public properties                                                    |
|----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)                       | [height](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/HeightRecord#height()) Height in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit.                                                            |
| `open `[Metadata](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Metadata) | [metadata](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/HeightRecord#metadata()) Set of common metadata associated with the written record.                                                                                                                |
| `open `[Instant](https://developer.android.com/reference/java/time/Instant.html)                                           | [time](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/HeightRecord#time()) Time the record happened.                                                                                                                                                         |
| `open `[ZoneOffset](https://developer.android.com/reference/java/time/ZoneOffset.html)`?`                                  | [zoneOffset](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/HeightRecord#zoneOffset()) User experienced zone offset at[time](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/HeightRecord#time()), or null if unknown. |

## Public companion properties

### HEIGHT_AVG

```
val HEIGHT_AVG: AggregateMetric<Length>
```

Metric identifier to retrieve the average height from[androidx.health.connect.client.aggregate.AggregationResult](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregationResult).  

### HEIGHT_MAX

```
val HEIGHT_MAX: AggregateMetric<Length>
```

Metric identifier to retrieve the maximum height from[androidx.health.connect.client.aggregate.AggregationResult](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregationResult).  

### HEIGHT_MIN

```
val HEIGHT_MIN: AggregateMetric<Length>
```

Metric identifier to retrieve minimum height from[androidx.health.connect.client.aggregate.AggregationResult](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregationResult).  

## Public constructors

### HeightRecord

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

```
HeightRecord(
    time: Instant,
    zoneOffset: ZoneOffset?,
    height: Length,
    metadata: Metadata
)
```  

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### height

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

```
val height: Length
```

Height in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit. Required field. Valid range: 0-3 meters.  

### metadata

```
open val metadata: Metadata
```

Set of common metadata associated with the written record.  

### time

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

```
open val time: Instant
```

Time the record happened.  

### zoneOffset

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

```
open val zoneOffset: ZoneOffset?
```

User experienced zone offset at[time](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/HeightRecord#time()), or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.