public final class HeightRecord implements Record


Captures the user's height.

Summary

Public fields

static final @NonNull AggregateMetric<@NonNull Length>

Metric identifier to retrieve the average height from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Length>

Metric identifier to retrieve the maximum height from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Length>

Metric identifier to retrieve minimum height from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

HeightRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    @NonNull Length height,
    @NonNull Metadata metadata
)

Public methods

boolean
equals(Object other)
final @NonNull Length

Height in Length unit.

@NonNull Metadata

Set of common metadata associated with the written record.

@NonNull Instant

Time the record happened.

ZoneOffset

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

int
@NonNull String

Public fields

HEIGHT_AVG

public static final @NonNull AggregateMetric<@NonNull LengthHEIGHT_AVG

Metric identifier to retrieve the average height from androidx.health.connect.client.aggregate.AggregationResult.

HEIGHT_MAX

public static final @NonNull AggregateMetric<@NonNull LengthHEIGHT_MAX

Metric identifier to retrieve the maximum height from androidx.health.connect.client.aggregate.AggregationResult.

HEIGHT_MIN

public static final @NonNull AggregateMetric<@NonNull LengthHEIGHT_MIN

Metric identifier to retrieve minimum height from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

HeightRecord

Added in 1.1.0-alpha10
public HeightRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    @NonNull Length height,
    @NonNull Metadata metadata
)

Public methods

equals

public boolean equals(Object other)

getHeight

Added in 1.1.0-alpha10
public final @NonNull Length getHeight()

Height in Length unit. Required field. Valid range: 0-3 meters.

getMetadata

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

Set of common metadata associated with the written record.

getTime

Added in 1.1.0-alpha10
public @NonNull Instant getTime()

Time the record happened.

getZoneOffset

Added in 1.1.0-alpha10
public ZoneOffset getZoneOffset()

User experienced zone offset at time, 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()

toString

public @NonNull String toString()