BloodPressureRecord


public final class BloodPressureRecord implements Record


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

Summary

Constants

static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int

Public fields

static final @NonNull AggregateMetric<@NonNull Pressure>

Metric identifier to retrieve average diastolic from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Pressure>

Metric identifier to retrieve maximum diastolic from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Pressure>

Metric identifier to retrieve minimum diastolic from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Pressure>

Metric identifier to retrieve average systolic from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Pressure>

Metric identifier to retrieve maximum systolic from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Pressure>

Metric identifier to retrieve minimum systolic from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

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

Public methods

boolean
equals(Object other)
final int

The user's body position when the measurement was taken.

final @NonNull Pressure

Diastolic blood pressure measurement, in Pressure unit.

final int

The arm and part of the arm where the measurement was taken.

@NonNull Metadata

Set of common metadata associated with the written record.

final @NonNull Pressure

Systolic blood pressure measurement, in Pressure unit.

@NonNull Instant

Time the record happened.

ZoneOffset

User experienced zone offset at time, or null if unknown.

int
@NonNull String

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 PressureDIASTOLIC_AVG

Metric identifier to retrieve average diastolic from androidx.health.connect.client.aggregate.AggregationResult.

DIASTOLIC_MAX

public static final @NonNull AggregateMetric<@NonNull PressureDIASTOLIC_MAX

Metric identifier to retrieve maximum diastolic from androidx.health.connect.client.aggregate.AggregationResult.

DIASTOLIC_MIN

public static final @NonNull AggregateMetric<@NonNull PressureDIASTOLIC_MIN

Metric identifier to retrieve minimum diastolic from androidx.health.connect.client.aggregate.AggregationResult.

SYSTOLIC_AVG

public static final @NonNull AggregateMetric<@NonNull PressureSYSTOLIC_AVG

Metric identifier to retrieve average systolic from androidx.health.connect.client.aggregate.AggregationResult.

SYSTOLIC_MAX

public static final @NonNull AggregateMetric<@NonNull PressureSYSTOLIC_MAX

Metric identifier to retrieve maximum systolic from androidx.health.connect.client.aggregate.AggregationResult.

SYSTOLIC_MIN

public static final @NonNull AggregateMetric<@NonNull PressureSYSTOLIC_MIN

Metric identifier to retrieve minimum systolic from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

BloodPressureRecord

Added in 1.1.0-alpha10
public BloodPressureRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    @NonNull Pressure systolic,
    @NonNull Pressure diastolic,
    int bodyPosition,
    int measurementLocation,
    @NonNull Metadata metadata
)

Public methods

equals

public boolean equals(Object other)

getBodyPosition

Added in 1.1.0-alpha10
public final int getBodyPosition()

The user's body position when the measurement was taken. Optional field. Allowed values: BodyPosition.

getDiastolic

Added in 1.1.0-alpha10
public final @NonNull Pressure getDiastolic()

Diastolic blood pressure measurement, in Pressure unit. Required field. Valid range: 10-180 mmHg.

getMeasurementLocation

Added in 1.1.0-alpha10
public final int getMeasurementLocation()

The arm and part of the arm where the measurement was taken. Optional field. Allowed values: MeasurementLocation.

getMetadata

Added in 1.1.0-alpha10
public @NonNull Metadata getMetadata()

Set of common metadata associated with the written record.

getSystolic

Added in 1.1.0-alpha10
public final @NonNull Pressure getSystolic()

Systolic blood pressure measurement, in Pressure unit. Required field. Valid range: 20-200 mmHg.

getTime

Added in 1.1.0-alpha10
public @NonNull Instant getTime()

Time the record happened.

getZoneOffset

Added in 1.1.0-alpha10
public ZoneOffset getZoneOffset()

User experienced zone offset at 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()