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

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 one of the following:
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 one of the following:

Public methods

build

fun build(): BloodPressureRecord
Return
BloodPressureRecord Object of BloodPressureRecord
This value cannot be null.

clearZoneOffset

fun clearZoneOffset(): BloodPressureRecord.Builder

Sets the zone offset of this record to system default.

Return
BloodPressureRecord.Builder This value cannot be null.

setZoneOffset

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.