BloodPressureRecord.Builder

public static final class BloodPressureRecord.Builder
extends Object

java.lang.Object
   ↳ android.health.connect.datatypes.BloodPressureRecord.Builder


Builder class for BloodPressureRecord

Summary

Public constructors

Builder(Metadata metadata, Instant time, int measurementLocation, Pressure systolic, Pressure diastolic, int bodyPosition)

Public methods

BloodPressureRecord build()
BloodPressureRecord.Builder clearZoneOffset()

Sets the zone offset of this record to system default.

BloodPressureRecord.Builder setZoneOffset(ZoneOffset zoneOffset)

Sets the zone offset of the user when the activity happened

Inherited methods

Public constructors

Builder

Added in API level 34
public Builder (Metadata metadata, 
                Instant time, 
                int measurementLocation, 
                Pressure systolic, 
                Pressure diastolic, 
                int bodyPosition)

Parameters
metadata Metadata: Metadata to be associated with the record. See Metadata. This value cannot be null.

time Instant: Start time of this activity This value cannot be null.

measurementLocation int: The arm and part of the arm where the measurement was taken. Optional field. Allowed values: BodyTemperatureMeasurementLocation. Value is BloodPressureRecord.BloodPressureMeasurementLocation.BLOOD_PRESSURE_MEASUREMENT_LOCATION_UNKNOWN, BloodPressureRecord.BloodPressureMeasurementLocation.BLOOD_PRESSURE_MEASUREMENT_LOCATION_LEFT_WRIST, BloodPressureRecord.BloodPressureMeasurementLocation.BLOOD_PRESSURE_MEASUREMENT_LOCATION_RIGHT_WRIST, BloodPressureRecord.BloodPressureMeasurementLocation.BLOOD_PRESSURE_MEASUREMENT_LOCATION_LEFT_UPPER_ARM, or BloodPressureRecord.BloodPressureMeasurementLocation.BLOOD_PRESSURE_MEASUREMENT_LOCATION_RIGHT_UPPER_ARM

systolic Pressure: Systolic blood pressure measurement, in Pressure unit. Required field. Valid range: 20-200 mmHg. This value cannot be null.

diastolic Pressure: Diastolic blood pressure measurement, in Pressure unit. Required field. Valid range: 10-180 mmHg. This value cannot be null.

bodyPosition int: The user's body position when the measurement was taken. Optional field. Allowed values: BodyPosition. Value is BloodPressureRecord.BodyPosition.BODY_POSITION_UNKNOWN, BloodPressureRecord.BodyPosition.BODY_POSITION_STANDING_UP, BloodPressureRecord.BodyPosition.BODY_POSITION_SITTING_DOWN, BloodPressureRecord.BodyPosition.BODY_POSITION_LYING_DOWN, or BloodPressureRecord.BodyPosition.BODY_POSITION_RECLINING

Public methods

build

Added in API level 34
public BloodPressureRecord build ()

Returns
BloodPressureRecord Object of BloodPressureRecord This value cannot be null.

clearZoneOffset

Added in API level 34
public BloodPressureRecord.Builder clearZoneOffset ()

Sets the zone offset of this record to system default.

Returns
BloodPressureRecord.Builder This value cannot be null.

setZoneOffset

Added in API level 34
public BloodPressureRecord.Builder setZoneOffset (ZoneOffset zoneOffset)

Sets the zone offset of the user when the activity happened

Parameters
zoneOffset ZoneOffset: This value cannot be null.

Returns
BloodPressureRecord.Builder This value cannot be null.