Builder


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

Builder class for BodyTemperatureRecord

Summary

Public constructors
Builder(metadata: Metadata, time: Instant, measurementLocation: Int, temperature: Temperature)

Public methods
BodyTemperatureRecord

BodyTemperatureRecord.Builder

Sets the zone offset of this record to system default.

BodyTemperatureRecord.Builder

Sets the zone offset of the user when the activity happened

Public constructors

Builder

Builder(
    metadata: Metadata,
    time: Instant,
    measurementLocation: Int,
    temperature: Temperature)
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: Where on the user's body the temperature measurement was taken from. Optional field. Allowed values: BodyTemperatureMeasurementLocation.
Value is one of the following:
temperature Temperature: Temperature in Temperature unit. Required field. Valid range: 0-100 Celsius degrees.
This value cannot be null.

Public methods

build

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

clearZoneOffset

fun clearZoneOffset(): BodyTemperatureRecord.Builder

Sets the zone offset of this record to system default.

Return
BodyTemperatureRecord.Builder This value cannot be null.

setZoneOffset

fun setZoneOffset(zoneOffset: ZoneOffset): BodyTemperatureRecord.Builder

Sets the zone offset of the user when the activity happened

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