Added in API level 34

Builder

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

Builder class for Vo2MaxRecord

Summary

Public constructors
Builder(metadata: Metadata, time: Instant, measurementMethod: Int, vo2MillilitersPerMinuteKilogram: Double)

Public methods
Vo2MaxRecord

Vo2MaxRecord.Builder

Sets the zone offset of this record to system default.

Vo2MaxRecord.Builder

Sets the zone offset of the user when the activity happened

Public constructors

Builder

Added in API level 34
Builder(
    metadata: Metadata,
    time: Instant,
    measurementMethod: Int,
    vo2MillilitersPerMinuteKilogram: Double)
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.
measurementMethod Int: VO2 max measurement method. Optional field. Allowed values: Vo2MaxMeasurementMethod. Value is android.health.connect.datatypes.Vo2MaxRecord.Vo2MaxMeasurementMethod#MEASUREMENT_METHOD_OTHER, android.health.connect.datatypes.Vo2MaxRecord.Vo2MaxMeasurementMethod#MEASUREMENT_METHOD_METABOLIC_CART, android.health.connect.datatypes.Vo2MaxRecord.Vo2MaxMeasurementMethod#MEASUREMENT_METHOD_HEART_RATE_RATIO, android.health.connect.datatypes.Vo2MaxRecord.Vo2MaxMeasurementMethod#MEASUREMENT_METHOD_COOPER_TEST, android.health.connect.datatypes.Vo2MaxRecord.Vo2MaxMeasurementMethod#MEASUREMENT_METHOD_MULTISTAGE_FITNESS_TEST, or android.health.connect.datatypes.Vo2MaxRecord.Vo2MaxMeasurementMethod#MEASUREMENT_METHOD_ROCKPORT_FITNESS_TEST
vo2MillilitersPerMinuteKilogram Double: Maximal aerobic capacity (VO2 max) in milliliters. Required field. Valid range: 0-100. Value is between 0 and 100 inclusive

Public methods

build

Added in API level 34
fun build(): Vo2MaxRecord
Return
Vo2MaxRecord Object of Vo2MaxRecord This value cannot be null.

clearZoneOffset

Added in API level 34
fun clearZoneOffset(): Vo2MaxRecord.Builder

Sets the zone offset of this record to system default.

Return
Vo2MaxRecord.Builder This value cannot be null.

setZoneOffset

Added in API level 34
fun setZoneOffset(zoneOffset: ZoneOffset): Vo2MaxRecord.Builder

Sets the zone offset of the user when the activity happened

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