Skip to content
AF
Health Connect reference

Every Health Connect aggregate metric

92 metrics on 24 records · read from Google’s Jetpack reference on 2026-10-03

Health Connect aggregates through companion constants of type AggregateMetric<T> on each record class — StepsRecord.COUNT_TOTAL, HeartRateRecord.BPM_AVG and 90 more across 24 of the 42 records. Pass them in an AggregateRequest and read each back from the AggregationResult; Google’s guide says the aggregation API also handles duplicate records.

Kotlin — two metrics, one request
val response = healthConnectClient.aggregate(
    AggregateRequest(
        metrics = setOf(StepsRecord.COUNT_TOTAL, HeartRateRecord.BPM_AVG),
        timeRangeFilter = TimeRangeFilter.between(startTime, endTime),
    )
)
// get() is declared as returning T? — nullable.
val steps: Long? = response[StepsRecord.COUNT_TOTAL]
val avgBpm: Long? = response[HeartRateRecord.BPM_AVG]

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.”

Activity

MetricValue typeGoogle’s description
ActiveCaloriesBurnedRecord.ACTIVE_CALORIES_TOTALEnergyMetric identifier to retrieve total active calories burned from androidx.health.connect.client.aggregate.AggregationResult.
ActivityIntensityRecord.DURATION_TOTALDurationMetric identifier to retrieve the total duration of activity intensity regardless of the type from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use androidx.health.connect.client.HealthConnectFeatures.getFeatureStatus with androidx.health.connect.client.HealthConnectFeatures.FEATURE_ACTIVITY_INTENSITY as the argument.
ActivityIntensityRecord.INTENSITY_MINUTES_TOTALLongMetric identifier to retrieve the number of weighted intensity minutes from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use androidx.health.connect.client.HealthConnectFeatures.getFeatureStatus with androidx.health.connect.client.HealthConnectFeatures.FEATURE_ACTIVITY_INTENSITY as the argument.
ActivityIntensityRecord.MODERATE_DURATION_TOTALDurationMetric identifier to retrieve the total duration of moderate activity intensity from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use androidx.health.connect.client.HealthConnectFeatures.getFeatureStatus with androidx.health.connect.client.HealthConnectFeatures.FEATURE_ACTIVITY_INTENSITY as the argument.
ActivityIntensityRecord.VIGOROUS_DURATION_TOTALDurationMetric identifier to retrieve the total duration of vigorous activity intensity from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use androidx.health.connect.client.HealthConnectFeatures.getFeatureStatus with androidx.health.connect.client.HealthConnectFeatures.FEATURE_ACTIVITY_INTENSITY as the argument.
CyclingPedalingCadenceRecord.RPM_AVGDoubleMetric identifier to retrieve average cycling pedaling cadence from androidx.health.connect.client.aggregate.AggregationResult.
CyclingPedalingCadenceRecord.RPM_MAXDoubleMetric identifier to retrieve maximum cycling pedaling cadence from androidx.health.connect.client.aggregate.AggregationResult.
CyclingPedalingCadenceRecord.RPM_MINDoubleMetric identifier to retrieve minimum cycling pedaling cadence from androidx.health.connect.client.aggregate.AggregationResult.
DistanceRecord.DISTANCE_TOTALLengthMetric identifier to retrieve the total distance from androidx.health.connect.client.aggregate.AggregationResult.
ElevationGainedRecord.ELEVATION_GAINED_TOTALLengthMetric identifier to retrieve the total elevation gained from androidx.health.connect.client.aggregate.AggregationResult.
ExerciseSessionRecord.EXERCISE_DURATION_TOTALDurationMetric identifier to retrieve the total exercise time from androidx.health.connect.client.aggregate.AggregationResult.
FloorsClimbedRecord.FLOORS_CLIMBED_TOTALDoubleMetric identifier to retrieve the total floors climbed from androidx.health.connect.client.aggregate.AggregationResult.
PowerRecord.POWER_AVGPowerMetric identifier to retrieve average power from androidx.health.connect.client.aggregate.AggregationResult.
PowerRecord.POWER_MAXPowerMetric identifier to retrieve maximum power from androidx.health.connect.client.aggregate.AggregationResult.
PowerRecord.POWER_MINPowerMetric identifier to retrieve minimum power from androidx.health.connect.client.aggregate.AggregationResult.
SpeedRecord.SPEED_AVGVelocityMetric identifier to retrieve average speed from androidx.health.connect.client.aggregate.AggregationResult.
SpeedRecord.SPEED_MAXVelocityMetric identifier to retrieve maximum speed from androidx.health.connect.client.aggregate.AggregationResult.
SpeedRecord.SPEED_MINVelocityMetric identifier to retrieve minimum speed from androidx.health.connect.client.aggregate.AggregationResult.
StepsRecord.COUNT_TOTALLongMetric identifier to retrieve the total steps count from androidx.health.connect.client.aggregate.AggregationResult.
StepsCadenceRecord.RATE_AVGDoubleMetric identifier to retrieve average steps cadence from androidx.health.connect.client.aggregate.AggregationResult.
StepsCadenceRecord.RATE_MAXDoubleMetric identifier to retrieve maximum steps cadence from androidx.health.connect.client.aggregate.AggregationResult.
StepsCadenceRecord.RATE_MINDoubleMetric identifier to retrieve minimum steps cadence from androidx.health.connect.client.aggregate.AggregationResult.
TotalCaloriesBurnedRecord.ENERGY_TOTALEnergyMetric identifier to retrieve total energy from androidx.health.connect.client.aggregate.AggregationResult.
WheelchairPushesRecord.COUNT_TOTALLongMetric identifier to retrieve the total wheelchair push count from androidx.health.connect.client.aggregate.AggregationResult.

Body Measurement

MetricValue typeGoogle’s description
BasalMetabolicRateRecord.BASAL_CALORIES_TOTALEnergyMetric identifier to retrieve the total basal calories burned from androidx.health.connect.client.aggregate.AggregationResult.
HeightRecord.HEIGHT_AVGLengthMetric identifier to retrieve the average height from androidx.health.connect.client.aggregate.AggregationResult.
HeightRecord.HEIGHT_MAXLengthMetric identifier to retrieve the maximum height from androidx.health.connect.client.aggregate.AggregationResult.
HeightRecord.HEIGHT_MINLengthMetric identifier to retrieve minimum height from androidx.health.connect.client.aggregate.AggregationResult.
WeightRecord.WEIGHT_AVGMassMetric identifier to retrieve the average weight from androidx.health.connect.client.aggregate.AggregationResult.
WeightRecord.WEIGHT_MAXMassMetric identifier to retrieve the maximum weight from androidx.health.connect.client.aggregate.AggregationResult.
WeightRecord.WEIGHT_MINMassMetric identifier to retrieve the minimum weight from androidx.health.connect.client.aggregate.AggregationResult.

Nutrition

MetricValue typeGoogle’s description
HydrationRecord.VOLUME_TOTALVolumeMetric identifier to retrieve total hydration from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.BIOTIN_TOTALMassMetric identifier to retrieve the total biotin from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.CAFFEINE_TOTALMassMetric identifier to retrieve the total caffeine from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.CALCIUM_TOTALMassMetric identifier to retrieve the total calcium from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.CHLORIDE_TOTALMassMetric identifier to retrieve the total chloride from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.CHOLESTEROL_TOTALMassMetric identifier to retrieve the total cholesterol from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.CHROMIUM_TOTALMassMetric identifier to retrieve the total chromium from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.COPPER_TOTALMassMetric identifier to retrieve the total copper from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.DIETARY_FIBER_TOTALMassMetric identifier to retrieve the total dietary fiber from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.ENERGY_FROM_FAT_TOTALEnergyMetric identifier to retrieve the total energy from fat from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.ENERGY_TOTALEnergyMetric identifier to retrieve the total energy from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.FOLATE_TOTALMassMetric identifier to retrieve the total folate from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.FOLIC_ACID_TOTALMassMetric identifier to retrieve the total folic acid from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.IODINE_TOTALMassMetric identifier to retrieve the total iodine from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.IRON_TOTALMassMetric identifier to retrieve the total iron from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.MAGNESIUM_TOTALMassMetric identifier to retrieve the total magnesium from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.MANGANESE_TOTALMassMetric identifier to retrieve the total manganese from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.MOLYBDENUM_TOTALMassMetric identifier to retrieve the total molybdenum from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.MONOUNSATURATED_FAT_TOTALMassMetric identifier to retrieve the total monounsaturated fat from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.NIACIN_TOTALMassMetric identifier to retrieve the total niacin from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.PANTOTHENIC_ACID_TOTALMassMetric identifier to retrieve the total pantothenic acid from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.PHOSPHORUS_TOTALMassMetric identifier to retrieve the total phosphorus from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.POLYUNSATURATED_FAT_TOTALMassMetric identifier to retrieve the total polyunsaturated fat from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.POTASSIUM_TOTALMassMetric identifier to retrieve the total potassium from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.PROTEIN_TOTALMassMetric identifier to retrieve the total protein from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.RIBOFLAVIN_TOTALMassMetric identifier to retrieve the total riboflavin from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.SATURATED_FAT_TOTALMassMetric identifier to retrieve the total saturated fat from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.SELENIUM_TOTALMassMetric identifier to retrieve the total selenium from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.SODIUM_TOTALMassMetric identifier to retrieve the total sodium from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.SUGAR_TOTALMassMetric identifier to retrieve the total sugar from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.THIAMIN_TOTALMassMetric identifier to retrieve the total thiamin from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.TOTAL_CARBOHYDRATE_TOTALMassMetric identifier to retrieve the total total carbohydrate from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.TOTAL_FAT_TOTALMassMetric identifier to retrieve the total total fat from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.TRANS_FAT_TOTALMassMetric identifier to retrieve the total trans fat from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.UNSATURATED_FAT_TOTALMassMetric identifier to retrieve the total unsaturated fat from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.VITAMIN_A_TOTALMassMetric identifier to retrieve the total vitamin a from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.VITAMIN_B12_TOTALMassMetric identifier to retrieve the total vitamin b12 from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.VITAMIN_B6_TOTALMassMetric identifier to retrieve the total vitamin b6 from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.VITAMIN_C_TOTALMassMetric identifier to retrieve the total vitamin c from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.VITAMIN_D_TOTALMassMetric identifier to retrieve the total vitamin d from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.VITAMIN_E_TOTALMassMetric identifier to retrieve the total vitamin e from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.VITAMIN_K_TOTALMassMetric identifier to retrieve the total vitamin k from androidx.health.connect.client.aggregate.AggregationResult.
NutritionRecord.ZINC_TOTALMassMetric identifier to retrieve the total zinc from androidx.health.connect.client.aggregate.AggregationResult.

Sleep

MetricValue typeGoogle’s description
SleepSessionRecord.SLEEP_DURATION_TOTALDurationMetric identifier to retrieve the total sleep session duration from androidx.health.connect.client.aggregate.AggregationResult.

Vitals

MetricValue typeGoogle’s description
BloodPressureRecord.DIASTOLIC_AVGPressureMetric identifier to retrieve average diastolic from androidx.health.connect.client.aggregate.AggregationResult.
BloodPressureRecord.DIASTOLIC_MAXPressureMetric identifier to retrieve maximum diastolic from androidx.health.connect.client.aggregate.AggregationResult.
BloodPressureRecord.DIASTOLIC_MINPressureMetric identifier to retrieve minimum diastolic from androidx.health.connect.client.aggregate.AggregationResult.
BloodPressureRecord.SYSTOLIC_AVGPressureMetric identifier to retrieve average systolic from androidx.health.connect.client.aggregate.AggregationResult.
BloodPressureRecord.SYSTOLIC_MAXPressureMetric identifier to retrieve maximum systolic from androidx.health.connect.client.aggregate.AggregationResult.
BloodPressureRecord.SYSTOLIC_MINPressureMetric identifier to retrieve minimum systolic from androidx.health.connect.client.aggregate.AggregationResult.
HeartRateRecord.BPM_AVGLongMetric identifier to retrieve the average heart rate from AggregationResult.
HeartRateRecord.BPM_MAXLongMetric identifier to retrieve the maximum heart rate from AggregationResult.
HeartRateRecord.BPM_MINLongMetric identifier to retrieve the minimum heart rate from AggregationResult.
HeartRateRecord.MEASUREMENTS_COUNTLongMetric identifier to retrieve the number of heart rate measurements from AggregationResult.
RestingHeartRateRecord.BPM_AVGLongMetric identifier to retrieve the average resting heart rate from AggregationResult.
RestingHeartRateRecord.BPM_MAXLongMetric identifier to retrieve the maximum resting heart rate from AggregationResult.
RestingHeartRateRecord.BPM_MINLongMetric identifier to retrieve the minimum resting heart rate from AggregationResult.
SkinTemperatureRecord.TEMPERATURE_DELTA_AVGTemperatureDeltaMetric identifier for retrieving the average skin temperature delta from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use HealthConnectFeatures.getFeatureStatus with HealthConnectFeatures.FEATURE_SKIN_TEMPERATURE as the argument.
SkinTemperatureRecord.TEMPERATURE_DELTA_MAXTemperatureDeltaMetric identifier for retrieving the maximum skin temperature delta from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use HealthConnectFeatures.getFeatureStatus with HealthConnectFeatures.FEATURE_SKIN_TEMPERATURE as the argument.
SkinTemperatureRecord.TEMPERATURE_DELTA_MINTemperatureDeltaMetric identifier for retrieving the minimum skin temperature delta from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use HealthConnectFeatures.getFeatureStatus with HealthConnectFeatures.FEATURE_SKIN_TEMPERATURE as the argument.

Wellness

MetricValue typeGoogle’s description
MindfulnessSessionRecord.MINDFULNESS_DURATION_TOTALDurationMetric identifier to retrieve the total mindfulness session duration from androidx.health.connect.client.aggregate.AggregationResult. To check if this metric is available, use HealthConnectFeatures.getFeatureStatus with HealthConnectFeatures.FEATURE_MINDFULNESS_SESSION as the argument.

Questions

Which Health Connect records have no aggregate metrics?
As read on 2026-10-03, Google's Jetpack reference defines no AggregateMetric constants on 18 of the 42 record classes: PlannedExerciseSessionRecord, Vo2MaxRecord, BodyFatRecord, BodyWaterMassRecord, BoneMassRecord, LeanBodyMassRecord, BasalBodyTemperatureRecord, CervicalMucusRecord, IntermenstrualBleedingRecord, MenstruationFlowRecord, MenstruationPeriodRecord, OvulationTestRecord, SexualActivityRecord, BloodGlucoseRecord, BodyTemperatureRecord, HeartRateVariabilityRmssdRecord, OxygenSaturationRecord, RespiratoryRateRecord. Read those with readRecords and summarise them yourself.
What value types do Health Connect aggregate metrics return?
The T in each metric's AggregateMetric<T> signature. Across the 92 metrics: 43 Mass, 10 Long, 7 Double, 6 Duration, 6 Pressure, 5 Energy, 5 Length, 3 Power, 3 Velocity, 3 TemperatureDelta, 1 Volume. Types such as Energy, Mass, Length or Duration are objects, not bare numbers — Google's data-types table links the unit ones to classes in androidx.health.connect.client.units.
Why does AggregationResult return null for a metric?
Because Google's AggregationResult reference declares the get operator as returning T? (nullable), so the type system makes you handle a missing value. Google's own steps example in the read-data guide falls back with ?: 0L; whether zero is the right fallback for an average or a maximum is a decision for your app.
How many aggregate metrics does NutritionRecord have?
42, more than any other record — from BIOTIN_TOTAL to ZINC_TOTAL. Google describes each one as the metric identifier to retrieve "the total" of that nutrient from the AggregationResult.

Metric names, value types and descriptions are copied from each record’s Jetpack reference page, read 2026-10-03 by AIFitnessAPI’s generator; Google’s data-types table lists the same set. Every record is on the Health Connect reference.