Write Blood Pressure Data

Your app can record blood pressure data by writing to the com.google.blood_pressure data type. In this data type, each data point represents a single instantaneous blood pressure reading. The data point contains fields for the systolic and diastolic pressure, body position during the reading, and location on the body where the measurement was performed.

To write a blood pressure data point, create a new DataSource of TYPE_BLOOD_PRESSURE, as shown in the following example.

DataSource bloodPressureSource =
    new DataSource.Builder()

DataPoint bloodPressure =
        .setTimestamp(now.getMillis(), MILLISECONDS)
        .setField(FIELD_BLOOD_PRESSURE_SYSTOLIC, 120.0f)
        .setField(FIELD_BLOOD_PRESSURE_DIASTOLIC, 80.0f)