# BloodPressureRecord

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

*** ** * ** ***


```
public final class BloodPressureRecord implements Record
```

<br />

*** ** * ** ***

Captures the blood pressure of a user. Each record represents a single instantaneous blood pressure reading.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if one of the values is outside the valid range. |

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#BODY_POSITION_LYING_DOWN() = 3` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#BODY_POSITION_RECLINING() = 4` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#BODY_POSITION_SITTING_DOWN() = 2` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#BODY_POSITION_STANDING_UP() = 1` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#BODY_POSITION_UNKNOWN() = 0` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#MEASUREMENT_LOCATION_LEFT_UPPER_ARM() = 3` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#MEASUREMENT_LOCATION_LEFT_WRIST() = 1` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#MEASUREMENT_LOCATION_RIGHT_UPPER_ARM() = 4` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#MEASUREMENT_LOCATION_RIGHT_WRIST() = 2` |
| `static final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#MEASUREMENT_LOCATION_UNKNOWN() = 0` |

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregateMetric<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure>` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#DIASTOLIC_AVG()` Metric identifier to retrieve average diastolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregateMetric<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure>` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#DIASTOLIC_MAX()` Metric identifier to retrieve maximum diastolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregateMetric<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure>` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#DIASTOLIC_MIN()` Metric identifier to retrieve minimum diastolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregateMetric<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure>` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#SYSTOLIC_AVG()` Metric identifier to retrieve average systolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregateMetric<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure>` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#SYSTOLIC_MAX()` Metric identifier to retrieve maximum systolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregateMetric<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure>` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#SYSTOLIC_MIN()` Metric identifier to retrieve minimum systolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#BloodPressureRecord(java.time.Instant,java.time.ZoneOffset,androidx.health.connect.client.records.metadata.Metadata,androidx.health.connect.client.units.Pressure,androidx.health.connect.client.units.Pressure,kotlin.Int,kotlin.Int)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html time, https://developer.android.com/reference/java/time/ZoneOffset.html zoneOffset, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Metadata metadata, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure systolic, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure diastolic, int bodyPosition, int measurementLocation )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#getBodyPosition()()` The user's body position when the measurement was taken. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#getDiastolic()()` Diastolic blood pressure measurement, in `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure` unit. |
| `final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#getMeasurementLocation()()` The arm and part of the arm where the measurement was taken. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Metadata` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#getMetadata()()` Set of common metadata associated with the written record. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#getSystolic()()` Systolic blood pressure measurement, in `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure` unit. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#getTime()()` Time the record happened. |
| `https://developer.android.com/reference/java/time/ZoneOffset.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#getZoneOffset()()` User experienced zone offset at `https://developer.android.com/reference/androidx/health/connect/client/records/InstantaneousRecord#time()`, or null if unknown. |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord#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/BloodPressureRecord#toString()()` |

## Constants

### BODY_POSITION_LYING_DOWN

```
public static final int BODY_POSITION_LYING_DOWN = 3
```

### BODY_POSITION_RECLINING

```
public static final int BODY_POSITION_RECLINING = 4
```

### BODY_POSITION_SITTING_DOWN

```
public static final int BODY_POSITION_SITTING_DOWN = 2
```

### BODY_POSITION_STANDING_UP

```
public static final int BODY_POSITION_STANDING_UP = 1
```

### BODY_POSITION_UNKNOWN

```
public static final int BODY_POSITION_UNKNOWN = 0
```

### MEASUREMENT_LOCATION_LEFT_UPPER_ARM

```
public static final int MEASUREMENT_LOCATION_LEFT_UPPER_ARM = 3
```

### MEASUREMENT_LOCATION_LEFT_WRIST

```
public static final int MEASUREMENT_LOCATION_LEFT_WRIST = 1
```

### MEASUREMENT_LOCATION_RIGHT_UPPER_ARM

```
public static final int MEASUREMENT_LOCATION_RIGHT_UPPER_ARM = 4
```

### MEASUREMENT_LOCATION_RIGHT_WRIST

```
public static final int MEASUREMENT_LOCATION_RIGHT_WRIST = 2
```

### MEASUREMENT_LOCATION_UNKNOWN

```
public static final int MEASUREMENT_LOCATION_UNKNOWN = 0
```

## Public fields

### DIASTOLIC_AVG

```
public static final @NonNull AggregateMetric<@NonNull Pressure> DIASTOLIC_AVG
```

Metric identifier to retrieve average diastolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`.

### DIASTOLIC_MAX

```
public static final @NonNull AggregateMetric<@NonNull Pressure> DIASTOLIC_MAX
```

Metric identifier to retrieve maximum diastolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`.

### DIASTOLIC_MIN

```
public static final @NonNull AggregateMetric<@NonNull Pressure> DIASTOLIC_MIN
```

Metric identifier to retrieve minimum diastolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`.

### SYSTOLIC_AVG

```
public static final @NonNull AggregateMetric<@NonNull Pressure> SYSTOLIC_AVG
```

Metric identifier to retrieve average systolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`.

### SYSTOLIC_MAX

```
public static final @NonNull AggregateMetric<@NonNull Pressure> SYSTOLIC_MAX
```

Metric identifier to retrieve maximum systolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`.

### SYSTOLIC_MIN

```
public static final @NonNull AggregateMetric<@NonNull Pressure> SYSTOLIC_MIN
```

Metric identifier to retrieve minimum systolic from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`.

## Public constructors

### BloodPressureRecord

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

```
public BloodPressureRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    @NonNull Metadata metadata,
    @NonNull Pressure systolic,
    @NonNull Pressure diastolic,
    int bodyPosition,
    int measurementLocation
)
```

## Public methods

### equals

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

### getBodyPosition

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

```
public final int getBodyPosition()
```

The user's body position when the measurement was taken. Optional field. Allowed values: `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord.BodyPosition`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord.BodyPosition` |   |

### getDiastolic

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

```
public final @NonNull Pressure getDiastolic()
```

Diastolic blood pressure measurement, in `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure` unit. Required field. Valid range: 10-180mmHg. For SDK extension 17 or higher, Valid range: 10-300mmHg.

### getMeasurementLocation

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

```
public final int getMeasurementLocation()
```

The arm and part of the arm where the measurement was taken. Optional field. Allowed values: `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord.MeasurementLocation`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/BloodPressureRecord.MeasurementLocation` |   |

### getMetadata

```
public @NonNull Metadata getMetadata()
```

Set of common metadata associated with the written record.

### getSystolic

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

```
public final @NonNull Pressure getSystolic()
```

Systolic blood pressure measurement, in `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure` unit. Required field. Valid range: 20-200mmHg. For SDK extension 17 or higher, Valid range: 20-300mmHg.

### getTime

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

```
public @NonNull Instant getTime()
```

Time the record happened.

### getZoneOffset

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

```
public ZoneOffset getZoneOffset()
```

User experienced zone offset at `https://developer.android.com/reference/androidx/health/connect/client/records/InstantaneousRecord#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.

### hashCode

```
public int hashCode()
```

### toString

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