Skip to content
AF
Health Connect reference

HydrationRecord: Health Connect hydration data

Read from Google’s documentation on 2026-10-03 · Google’s reference page last updated 2026-06-24

HydrationRecord is Health Connect's hydration record — an Interval record in Google's Nutrition category. Its read permission is android.permission.health.READ_HYDRATION; its write permission is android.permission.health.WRITE_HYDRATION. It supports 1 aggregate metric (VOLUME_TOTAL). Mandatory fields per Google's table: endTime, metadata, startTime and volume.

What Google says HydrationRecord is

Captures how much water a user drank in a single drink.

Quoted from Google’s HydrationRecord Jetpack reference, last updated 2026-06-24, read 2026-10-03.

Class
androidx.health.connect.client.records.HydrationRecord
Google's category
Nutrition
Record type
Interval
Unit class
androidx.health.connect.client.units.Volume
Mandatory fields
endTimemetadatastartTimevolume
Added in (Jetpack)
1.1.0

Permissions

The exact strings Google’s data-types table declares for HydrationRecord. Google’s page: “Before requesting any permissions, your app must declare them in the manifest.”

AccessPermission stringFramework reference
Readandroid.permission.health.READ_HYDRATIONAPI 34 · U Ext 7
Writeandroid.permission.health.WRITE_HYDRATIONAPI 34 · U Ext 7
AndroidManifest.xml
<uses-permission android:name="android.permission.health.READ_HYDRATION" />
<uses-permission android:name="android.permission.health.WRITE_HYDRATION" />
Kotlin — the same strings from the Jetpack helper
import androidx.health.connect.client.permission.HealthPermission
import androidx.health.connect.client.records.HydrationRecord

val permissions = setOf(
    HealthPermission.getReadPermission(HydrationRecord::class),
    HealthPermission.getWritePermission(HydrationRecord::class),
)

The 6 fields of HydrationRecord

Types and descriptions as Google’s reference prints them. The range column quotes Google’s own range annotation or sentence; a dash means Google states none, which is not the same as no validation.

FieldTypeAllowed rangeGoogle’s description
endTimemandatoryInstant—End time of the record.
endZoneOffsetZoneOffset?—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.
metadatamandatoryMetadata—Set of common metadata associated with the written record.
startTimemandatoryInstant—Start time of the record.
startZoneOffsetZoneOffset?—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.
volumemandatoryVolumeValid range: 0-100 liters.Volume of water in Volume unit. Required field. Valid range: 0-100 liters.

Aggregate metrics

The AggregateMetric constants Google defines on HydrationRecord. The value type is the T in Google’s AggregateMetric<T> signature. Every aggregate metric across all records.

MetricValue typeGoogle’s description
HydrationRecord.VOLUME_TOTALVolumeMetric identifier to retrieve total hydration from androidx.health.connect.client.aggregate.AggregationResult.

Google’s read-data guide: “For cumulative types like StepsRecord, use aggregate() instead of readRecords() to avoid double counting from multiple sources and improve accuracy.” and “The aggregation API also contains logic to handle duplicate records, and lessens the chances of rate limiting.”

Read HydrationRecord in Kotlin

The shape of Google’s own read example, with HydrationRecord and its names filled in. Get the client with HealthConnectClient.getOrCreate(context) after checking getSdkStatus.

readRecords
import androidx.health.connect.client.HealthConnectClient
import androidx.health.connect.client.records.HydrationRecord
import androidx.health.connect.client.request.ReadRecordsRequest
import androidx.health.connect.client.time.TimeRangeFilter
import java.time.Instant

suspend fun readHydration(
    client: HealthConnectClient,
    startTime: Instant,
    endTime: Instant,
): List<HydrationRecord> {
    val response = client.readRecords(
        ReadRecordsRequest(
            HydrationRecord::class,
            timeRangeFilter = TimeRangeFilter.between(startTime, endTime),
        )
    )
    // One page of up to pageSize records (default 1000); follow
    // response.pageToken for the rest.
    return response.records
}
aggregate
import androidx.health.connect.client.HealthConnectClient
import androidx.health.connect.client.records.HydrationRecord
import androidx.health.connect.client.request.AggregateRequest
import androidx.health.connect.client.time.TimeRangeFilter
import java.time.Instant
import androidx.health.connect.client.units.Volume

suspend fun aggregateHydration(
    client: HealthConnectClient,
    startTime: Instant,
    endTime: Instant,
): Volume? {
    val response = client.aggregate(
        AggregateRequest(
            metrics = setOf(HydrationRecord.VOLUME_TOTAL),
            timeRangeFilter = TimeRangeFilter.between(startTime, endTime),
        )
    )
    // get() is declared as returning a nullable value.
    return response[HydrationRecord.VOLUME_TOTAL]
}

Setting up the client, the permission flow and Play Console declaration: integrating Health Connect step by step.

HealthKit counterpart

No verified HealthKit counterpart. The cross-platform matrix only pairs metrics checked against both Apple’s and Google’s documentation, and HydrationRecord is not among them yet. A similarly named Apple type may exist on the HealthKit reference, but a name match is not a verified mapping.

Questions

What permission does HydrationRecord need?
Google's Health Connect data-types table (read 2026-10-03) declares android.permission.health.READ_HYDRATION for reading HydrationRecord and android.permission.health.WRITE_HYDRATION for writing it, and says apps must declare permissions in the manifest before requesting them.
Which aggregate metrics does HydrationRecord support?
Google's Jetpack reference defines 1 on HydrationRecord: VOLUME_TOTAL (AggregateMetric<Volume>). Pass it in the metrics set of an AggregateRequest and read it back from the AggregationResult.
What values does HydrationRecord.volume accept?
Google's reference types volume as Volume. Its description reads: "Volume of water in Volume unit. Required field. Valid range: 0-100 liters."
Is HydrationRecord an interval, instantaneous or series record?
Google's data-types table lists HydrationRecord as Interval, and defines that column as indicating "whether the data is recorded at an instant in time or over an interval". Its mandatory fields are endTime, metadata, startTime and volume.

Other Nutrition records

All Nutrition records →

Sources checked

Google’s descriptions are quoted for identification; the page layout, the capsule and the cross-platform pairing are AIFitnessAPI’s. Generated from Google’s pages by a script, not typed by hand — the same data is behind every page in the Health Connect reference.

← All Health Connect records · Every permission string