ElevationGainedRecord


public final class ElevationGainedRecord implements Record


Captures the elevation gained by the user since the last reading.

Summary

Public fields

static final @NonNull AggregateMetric<@NonNull Length>

Metric identifier to retrieve the total elevation gained from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

ElevationGainedRecord(
    @NonNull Instant startTime,
    ZoneOffset startZoneOffset,
    @NonNull Instant endTime,
    ZoneOffset endZoneOffset,
    @NonNull Length elevation,
    @NonNull Metadata metadata
)

Public methods

boolean
equals(Object other)
final @NonNull Length

Elevation in Length units.

@NonNull Instant

End time of the record.

ZoneOffset

User experienced zone offset at endTime, or null if unknown.

@NonNull Metadata

Set of common metadata associated with the written record.

@NonNull Instant

Start time of the record.

ZoneOffset

User experienced zone offset at startTime, or null if unknown.

int

Public fields

ELEVATION_GAINED_TOTAL

public static final @NonNull AggregateMetric<@NonNull LengthELEVATION_GAINED_TOTAL

Metric identifier to retrieve the total elevation gained from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

ElevationGainedRecord

Added in 1.1.0-alpha07
public ElevationGainedRecord(
    @NonNull Instant startTime,
    ZoneOffset startZoneOffset,
    @NonNull Instant endTime,
    ZoneOffset endZoneOffset,
    @NonNull Length elevation,
    @NonNull Metadata metadata
)

Public methods

equals

public boolean equals(Object other)

getElevation

Added in 1.1.0-alpha07
public final @NonNull Length getElevation()

Elevation in Length units. Required field. Valid range: -1000000-1000000 meters.

getEndTime

Added in 1.1.0-alpha07
public @NonNull Instant getEndTime()

End time of the record.

getEndZoneOffset

Added in 1.1.0-alpha07
public ZoneOffset getEndZoneOffset()

User experienced zone offset at endTime, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.

getMetadata

Added in 1.1.0-alpha07
public @NonNull Metadata getMetadata()

Set of common metadata associated with the written record.

getStartTime

Added in 1.1.0-alpha07
public @NonNull Instant getStartTime()

Start time of the record.

getStartZoneOffset

Added in 1.1.0-alpha07
public ZoneOffset getStartZoneOffset()

User experienced zone offset at startTime, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.

hashCode

public int hashCode()