Builder


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

Builder class for BloodGlucoseRecord

Summary

Public constructors
Builder(metadata: Metadata, time: Instant, specimenSource: Int, level: BloodGlucose, relationToMeal: Int, mealType: Int)

Public methods
BloodGlucoseRecord

BloodGlucoseRecord.Builder

Sets the zone offset of this record to system default.

BloodGlucoseRecord.Builder

Sets the zone offset of the user when the activity happened

Public constructors

Builder

Builder(
    metadata: Metadata,
    time: Instant,
    specimenSource: Int,
    level: BloodGlucose,
    relationToMeal: Int,
    mealType: 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.
specimenSource Int: Type of body fluid used to measure the blood glucose. Optional, enum field. Allowed values: SpecimenSource.
Value is one of the following:
level BloodGlucose: Blood glucose level or concentration in BloodGlucose unit. Required field. Valid range: 0-50 mmol/L.
This value cannot be null.
relationToMeal Int: Relationship of the meal to the blood glucose measurement. Optional, enum field. Allowed values: RelationToMealType.
Value is one of the following:
mealType Int: Type of meal related to the blood glucose measurement. Optional, enum field. Allowed values: MealType.
Value is one of the following:

Public methods

build

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

clearZoneOffset

fun clearZoneOffset(): BloodGlucoseRecord.Builder

Sets the zone offset of this record to system default.

Return
BloodGlucoseRecord.Builder This value cannot be null.

setZoneOffset

fun setZoneOffset(zoneOffset: ZoneOffset): BloodGlucoseRecord.Builder

Sets the zone offset of the user when the activity happened

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