Added in API level 34

Builder

class Builder
kotlin.Any
   ↳ android.health.connect.datatypes.BloodPressureRecord.Builder

Builder class for BloodPressureRecord

Summary

Public constructors
Builder(metadata: Metadata, time: Instant, measurementLocation: Int, systolic: Pressure, diastolic: Pressure, bodyPosition: Int)

Public methods
BloodPressureRecord

BloodPressureRecord.Builder

Sets the zone offset of this record to system default.

BloodPressureRecord.Builder

Sets the zone offset of the user when the activity happened

Public constructors

Builder

Added in API level 34
Builder(
    metadata: Metadata,
    time: Instant,
    measurementLocation: Int,
    systolic: Pressure,
    diastolic: Pressure,
    bodyPosition: Int)
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 android.health.connect.datatypes.BloodPressureRecord.BloodPressureMeasurementLocation#BLOOD_PRESSURE_MEASUREMENT_LOCATION_UNKNOWN, android.health.connect.datatypes.BloodPressureRecord.BloodPressureMeasurementLocation#BLOOD_PRESSURE_MEASUREMENT_LOCATION_LEFT_WRIST, android.health.connect.datatypes.BloodPressureRecord.BloodPressureMeasurementLocation#BLOOD_PRESSURE_MEASUREMENT_LOCATION_RIGHT_WRIST, android.health.connect.datatypes.BloodPressureRecord.BloodPressureMeasurementLocation#BLOOD_PRESSURE_MEASUREMENT_LOCATION_LEFT_UPPER_ARM, or android.health.connect.datatypes.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 android.health.connect.datatypes.BloodPressureRecord.BodyPosition#BODY_POSITION_UNKNOWN, android.health.connect.datatypes.BloodPressureRecord.BodyPosition#BODY_POSITION_STANDING_UP, android.health.connect.datatypes.BloodPressureRecord.BodyPosition#BODY_POSITION_SITTING_DOWN, android.health.connect.datatypes.BloodPressureRecord.BodyPosition#BODY_POSITION_LYING_DOWN, or android.health.connect.datatypes.BloodPressureRecord.BodyPosition#BODY_POSITION_RECLINING

Public methods

build

Added in API level 34
fun build(): BloodPressureRecord
Return
BloodPressureRecord Object of BloodPressureRecord This value cannot be null.

clearZoneOffset

Added in API level 34
fun clearZoneOffset(): BloodPressureRecord.Builder

Sets the zone offset of this record to system default.

Return
BloodPressureRecord.Builder This value cannot be null.

setZoneOffset

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

Sets the zone offset of the user when the activity happened

Parameters
zoneOffset ZoneOffset: This value cannot be null.
Return
BloodPressureRecord.Builder This value cannot be null.