Builder


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

Builder class for ElevationGainedRecord

Summary

Public constructors
Builder(metadata: Metadata, startTime: Instant, endTime: Instant, elevation: Length)

Public methods
ElevationGainedRecord

ElevationGainedRecord.Builder

Sets the start zone offset of this record to system default.

ElevationGainedRecord.Builder

Sets the start zone offset of this record to system default.

ElevationGainedRecord.Builder
setEndZoneOffset(endZoneOffset: ZoneOffset)

Sets the zone offset of the user when the activity ended

ElevationGainedRecord.Builder
setStartZoneOffset(startZoneOffset: ZoneOffset)

Sets the zone offset of the user when the activity started

Public constructors

Builder

Builder(
    metadata: Metadata,
    startTime: Instant,
    endTime: Instant,
    elevation: Length)
Parameters
metadata Metadata: Metadata to be associated with the record. See Metadata.
This value cannot be null.
startTime Instant: Start time of this activity.
This value cannot be null.
endTime Instant: End time of this activity.
This value cannot be null.
elevation Length: Elevation in Length unit. Required field. Valid range: -1000000-1000000 meters.
This value cannot be null.

Public methods

build

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

clearEndZoneOffset

fun clearEndZoneOffset(): ElevationGainedRecord.Builder

Sets the start zone offset of this record to system default.

Return
ElevationGainedRecord.Builder This value cannot be null.

clearStartZoneOffset

fun clearStartZoneOffset(): ElevationGainedRecord.Builder

Sets the start zone offset of this record to system default.

Return
ElevationGainedRecord.Builder This value cannot be null.

setEndZoneOffset

fun setEndZoneOffset(endZoneOffset: ZoneOffset): ElevationGainedRecord.Builder

Sets the zone offset of the user when the activity ended

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

setStartZoneOffset

fun setStartZoneOffset(startZoneOffset: ZoneOffset): ElevationGainedRecord.Builder

Sets the zone offset of the user when the activity started

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