BloodGlucoseRecord.Builder


public static final class BloodGlucoseRecord.Builder
extends Object

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


Builder class for BloodGlucoseRecord

Summary

Public constructors

Builder(Metadata metadata, Instant time, int specimenSource, BloodGlucose level, int relationToMeal, int mealType)

Public methods

BloodGlucoseRecord build()
BloodGlucoseRecord.Builder clearZoneOffset()

Sets the zone offset of this record to system default.

BloodGlucoseRecord.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
Also in U Extensions 7
public Builder (Metadata metadata, 
                Instant time, 
                int specimenSource, 
                BloodGlucose level, 
                int relationToMeal, 
                int mealType)

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

Added in API level 34
Also in U Extensions 7
public BloodGlucoseRecord build ()

Returns
BloodGlucoseRecord Object of BloodGlucoseRecord
This value cannot be null.

clearZoneOffset

Added in API level 34
Also in U Extensions 7
public BloodGlucoseRecord.Builder clearZoneOffset ()

Sets the zone offset of this record to system default.

Returns
BloodGlucoseRecord.Builder This value cannot be null.

setZoneOffset

Added in API level 34
Also in U Extensions 7
public BloodGlucoseRecord.Builder setZoneOffset (ZoneOffset zoneOffset)

Sets the zone offset of the user when the activity happened

Parameters
zoneOffset ZoneOffset: This value cannot be null.

Returns
BloodGlucoseRecord.Builder This value cannot be null.