ElevationGainedRecord.Builder


public static final class ElevationGainedRecord.Builder
extends Object

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


Builder class for ElevationGainedRecord

Summary

Public constructors

Builder(Metadata metadata, Instant startTime, Instant endTime, Length elevation)

Public methods

ElevationGainedRecord build()
ElevationGainedRecord.Builder clearEndZoneOffset()

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

ElevationGainedRecord.Builder clearStartZoneOffset()

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

ElevationGainedRecord.Builder setEndZoneOffset(ZoneOffset endZoneOffset)

Sets the zone offset of the user when the activity ended

ElevationGainedRecord.Builder setStartZoneOffset(ZoneOffset startZoneOffset)

Sets the zone offset of the user when the activity started

Inherited methods

Public constructors

Builder

Added in API level 34
public Builder (Metadata metadata, 
                Instant startTime, 
                Instant endTime, 
                Length elevation)

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

Added in API level 34
public ElevationGainedRecord build ()

Returns
ElevationGainedRecord Object of ElevationGainedRecord This value cannot be null.

clearEndZoneOffset

Added in API level 34
public ElevationGainedRecord.Builder clearEndZoneOffset ()

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

Returns
ElevationGainedRecord.Builder This value cannot be null.

clearStartZoneOffset

Added in API level 34
public ElevationGainedRecord.Builder clearStartZoneOffset ()

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

Returns
ElevationGainedRecord.Builder This value cannot be null.

setEndZoneOffset

Added in API level 34
public ElevationGainedRecord.Builder setEndZoneOffset (ZoneOffset endZoneOffset)

Sets the zone offset of the user when the activity ended

Parameters
endZoneOffset ZoneOffset: This value cannot be null.

Returns
ElevationGainedRecord.Builder This value cannot be null.

setStartZoneOffset

Added in API level 34
public ElevationGainedRecord.Builder setStartZoneOffset (ZoneOffset startZoneOffset)

Sets the zone offset of the user when the activity started

Parameters
startZoneOffset ZoneOffset: This value cannot be null.

Returns
ElevationGainedRecord.Builder This value cannot be null.