HydrationRecord
public final class HydrationRecord implements Record
Captures how much water a user drank in a single drink.
Summary
Public fields |
|
|---|---|
static final @NonNull AggregateMetric<@NonNull Volume> |
Metric identifier to retrieve total hydration from |
Public constructors |
|---|
HydrationRecord( |
Public methods |
|
|---|---|
boolean |
|
@NonNull Instant |
End time of the record. |
ZoneOffset |
User experienced zone offset at |
@NonNull Metadata |
Set of common metadata associated with the written record. |
@NonNull Instant |
Start time of the record. |
ZoneOffset |
User experienced zone offset at |
final @NonNull Volume |
Volume of water in |
int |
hashCode() |
@NonNull String |
toString() |
Public fields
VOLUME_TOTAL
public static final @NonNull AggregateMetric<@NonNull Volume> VOLUME_TOTAL
Metric identifier to retrieve total hydration from androidx.health.connect.client.aggregate.AggregationResult.
Public constructors
HydrationRecord
public HydrationRecord(
@NonNull Instant startTime,
ZoneOffset startZoneOffset,
@NonNull Instant endTime,
ZoneOffset endZoneOffset,
@NonNull Volume volume,
@NonNull Metadata metadata
)
Public methods
getEndZoneOffset
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
public @NonNull Metadata getMetadata()
Set of common metadata associated with the written record.
getStartZoneOffset
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.