Builder


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

Builder class for ActivityIntensityRecord

Summary

Public constructors
Builder(metadata: Metadata, startTime: Instant, endTime: Instant, activityIntensityType: Int)

Public methods
ActivityIntensityRecord

Returns ActivityIntensityRecord

ActivityIntensityRecord.Builder
setEndZoneOffset(endZoneOffset: ZoneOffset)

Sets the ZoneOffset of the user when the activity ended.

ActivityIntensityRecord.Builder
setStartZoneOffset(startZoneOffset: ZoneOffset)

Sets the ZoneOffset of the user when the activity started.

Public constructors

Builder

Builder(
    metadata: Metadata,
    startTime: Instant,
    endTime: Instant,
    activityIntensityType: Int)
Parameters
metadata Metadata: Metadata to be associated with the record. See Metadata. This value cannot be null.
startTime Instant: Start time of this activity instensity record. This value cannot be null.
endTime Instant: End time of this activity intensity record. This value cannot be null.
activityIntensityType Int: Value is android.health.connect.datatypes.ActivityIntensityRecord#ACTIVITY_INTENSITY_TYPE_MODERATE, or android.health.connect.datatypes.ActivityIntensityRecord#ACTIVITY_INTENSITY_TYPE_VIGOROUS

Public methods

build

fun build(): ActivityIntensityRecord

Returns ActivityIntensityRecord

Return
ActivityIntensityRecord This value cannot be null.

setEndZoneOffset

fun setEndZoneOffset(endZoneOffset: ZoneOffset): ActivityIntensityRecord.Builder

Sets the ZoneOffset of the user when the activity ended.

Defaults to the system zone offset if not set.

Parameters
endZoneOffset ZoneOffset: This value cannot be null.
Return
ActivityIntensityRecord.Builder This value cannot be null.

setStartZoneOffset

fun setStartZoneOffset(startZoneOffset: ZoneOffset): ActivityIntensityRecord.Builder

Sets the ZoneOffset of the user when the activity started.

Defaults to the system zone offset if not set.

Parameters
startZoneOffset ZoneOffset: This value cannot be null.
Return
ActivityIntensityRecord.Builder This value cannot be null.