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.
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
| Metric | Value type | Google’s description |
|---|---|---|
| ActiveCaloriesBurnedRecord.ACTIVE_CALORIES_TOTAL | Energy | Metric identifier to retrieve total active calories burned from androidx.health.connect.client.aggregate.AggregationResult. |
| ActivityIntensityRecord.DURATION_TOTAL | Duration | Metric 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_TOTAL | Long | Metric 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_TOTAL | Duration | Metric 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_TOTAL | Duration | Metric 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_AVG | Double | Metric identifier to retrieve average cycling pedaling cadence from androidx.health.connect.client.aggregate.AggregationResult. |
| CyclingPedalingCadenceRecord.RPM_MAX | Double | Metric identifier to retrieve maximum cycling pedaling cadence from androidx.health.connect.client.aggregate.AggregationResult. |
| CyclingPedalingCadenceRecord.RPM_MIN | Double | Metric identifier to retrieve minimum cycling pedaling cadence from androidx.health.connect.client.aggregate.AggregationResult. |
| DistanceRecord.DISTANCE_TOTAL | Length | Metric identifier to retrieve the total distance from androidx.health.connect.client.aggregate.AggregationResult. |
| ElevationGainedRecord.ELEVATION_GAINED_TOTAL | Length | Metric identifier to retrieve the total elevation gained from androidx.health.connect.client.aggregate.AggregationResult. |
| ExerciseSessionRecord.EXERCISE_DURATION_TOTAL | Duration | Metric identifier to retrieve the total exercise time from androidx.health.connect.client.aggregate.AggregationResult. |
| FloorsClimbedRecord.FLOORS_CLIMBED_TOTAL | Double | Metric identifier to retrieve the total floors climbed from androidx.health.connect.client.aggregate.AggregationResult. |
| PowerRecord.POWER_AVG | Power | Metric identifier to retrieve average power from androidx.health.connect.client.aggregate.AggregationResult. |
| PowerRecord.POWER_MAX | Power | Metric identifier to retrieve maximum power from androidx.health.connect.client.aggregate.AggregationResult. |
| PowerRecord.POWER_MIN | Power | Metric identifier to retrieve minimum power from androidx.health.connect.client.aggregate.AggregationResult. |
| SpeedRecord.SPEED_AVG | Velocity | Metric identifier to retrieve average speed from androidx.health.connect.client.aggregate.AggregationResult. |
| SpeedRecord.SPEED_MAX | Velocity | Metric identifier to retrieve maximum speed from androidx.health.connect.client.aggregate.AggregationResult. |
| SpeedRecord.SPEED_MIN | Velocity | Metric identifier to retrieve minimum speed from androidx.health.connect.client.aggregate.AggregationResult. |
| StepsRecord.COUNT_TOTAL | Long | Metric identifier to retrieve the total steps count from androidx.health.connect.client.aggregate.AggregationResult. |
| StepsCadenceRecord.RATE_AVG | Double | Metric identifier to retrieve average steps cadence from androidx.health.connect.client.aggregate.AggregationResult. |
| StepsCadenceRecord.RATE_MAX | Double | Metric identifier to retrieve maximum steps cadence from androidx.health.connect.client.aggregate.AggregationResult. |
| StepsCadenceRecord.RATE_MIN | Double | Metric identifier to retrieve minimum steps cadence from androidx.health.connect.client.aggregate.AggregationResult. |
| TotalCaloriesBurnedRecord.ENERGY_TOTAL | Energy | Metric identifier to retrieve total energy from androidx.health.connect.client.aggregate.AggregationResult. |
| WheelchairPushesRecord.COUNT_TOTAL | Long | Metric identifier to retrieve the total wheelchair push count from androidx.health.connect.client.aggregate.AggregationResult. |
Body Measurement
| Metric | Value type | Google’s description |
|---|---|---|
| BasalMetabolicRateRecord.BASAL_CALORIES_TOTAL | Energy | Metric identifier to retrieve the total basal calories burned from androidx.health.connect.client.aggregate.AggregationResult. |
| HeightRecord.HEIGHT_AVG | Length | Metric identifier to retrieve the average height from androidx.health.connect.client.aggregate.AggregationResult. |
| HeightRecord.HEIGHT_MAX | Length | Metric identifier to retrieve the maximum height from androidx.health.connect.client.aggregate.AggregationResult. |
| HeightRecord.HEIGHT_MIN | Length | Metric identifier to retrieve minimum height from androidx.health.connect.client.aggregate.AggregationResult. |
| WeightRecord.WEIGHT_AVG | Mass | Metric identifier to retrieve the average weight from androidx.health.connect.client.aggregate.AggregationResult. |
| WeightRecord.WEIGHT_MAX | Mass | Metric identifier to retrieve the maximum weight from androidx.health.connect.client.aggregate.AggregationResult. |
| WeightRecord.WEIGHT_MIN | Mass | Metric identifier to retrieve the minimum weight from androidx.health.connect.client.aggregate.AggregationResult. |
Nutrition
| Metric | Value type | Google’s description |
|---|---|---|
| HydrationRecord.VOLUME_TOTAL | Volume | Metric identifier to retrieve total hydration from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.BIOTIN_TOTAL | Mass | Metric identifier to retrieve the total biotin from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.CAFFEINE_TOTAL | Mass | Metric identifier to retrieve the total caffeine from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.CALCIUM_TOTAL | Mass | Metric identifier to retrieve the total calcium from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.CHLORIDE_TOTAL | Mass | Metric identifier to retrieve the total chloride from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.CHOLESTEROL_TOTAL | Mass | Metric identifier to retrieve the total cholesterol from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.CHROMIUM_TOTAL | Mass | Metric identifier to retrieve the total chromium from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.COPPER_TOTAL | Mass | Metric identifier to retrieve the total copper from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.DIETARY_FIBER_TOTAL | Mass | Metric identifier to retrieve the total dietary fiber from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.ENERGY_FROM_FAT_TOTAL | Energy | Metric identifier to retrieve the total energy from fat from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.ENERGY_TOTAL | Energy | Metric identifier to retrieve the total energy from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.FOLATE_TOTAL | Mass | Metric identifier to retrieve the total folate from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.FOLIC_ACID_TOTAL | Mass | Metric identifier to retrieve the total folic acid from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.IODINE_TOTAL | Mass | Metric identifier to retrieve the total iodine from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.IRON_TOTAL | Mass | Metric identifier to retrieve the total iron from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.MAGNESIUM_TOTAL | Mass | Metric identifier to retrieve the total magnesium from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.MANGANESE_TOTAL | Mass | Metric identifier to retrieve the total manganese from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.MOLYBDENUM_TOTAL | Mass | Metric identifier to retrieve the total molybdenum from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.MONOUNSATURATED_FAT_TOTAL | Mass | Metric identifier to retrieve the total monounsaturated fat from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.NIACIN_TOTAL | Mass | Metric identifier to retrieve the total niacin from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.PANTOTHENIC_ACID_TOTAL | Mass | Metric identifier to retrieve the total pantothenic acid from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.PHOSPHORUS_TOTAL | Mass | Metric identifier to retrieve the total phosphorus from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.POLYUNSATURATED_FAT_TOTAL | Mass | Metric identifier to retrieve the total polyunsaturated fat from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.POTASSIUM_TOTAL | Mass | Metric identifier to retrieve the total potassium from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.PROTEIN_TOTAL | Mass | Metric identifier to retrieve the total protein from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.RIBOFLAVIN_TOTAL | Mass | Metric identifier to retrieve the total riboflavin from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.SATURATED_FAT_TOTAL | Mass | Metric identifier to retrieve the total saturated fat from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.SELENIUM_TOTAL | Mass | Metric identifier to retrieve the total selenium from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.SODIUM_TOTAL | Mass | Metric identifier to retrieve the total sodium from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.SUGAR_TOTAL | Mass | Metric identifier to retrieve the total sugar from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.THIAMIN_TOTAL | Mass | Metric identifier to retrieve the total thiamin from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.TOTAL_CARBOHYDRATE_TOTAL | Mass | Metric identifier to retrieve the total total carbohydrate from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.TOTAL_FAT_TOTAL | Mass | Metric identifier to retrieve the total total fat from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.TRANS_FAT_TOTAL | Mass | Metric identifier to retrieve the total trans fat from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.UNSATURATED_FAT_TOTAL | Mass | Metric identifier to retrieve the total unsaturated fat from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.VITAMIN_A_TOTAL | Mass | Metric identifier to retrieve the total vitamin a from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.VITAMIN_B12_TOTAL | Mass | Metric identifier to retrieve the total vitamin b12 from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.VITAMIN_B6_TOTAL | Mass | Metric identifier to retrieve the total vitamin b6 from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.VITAMIN_C_TOTAL | Mass | Metric identifier to retrieve the total vitamin c from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.VITAMIN_D_TOTAL | Mass | Metric identifier to retrieve the total vitamin d from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.VITAMIN_E_TOTAL | Mass | Metric identifier to retrieve the total vitamin e from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.VITAMIN_K_TOTAL | Mass | Metric identifier to retrieve the total vitamin k from androidx.health.connect.client.aggregate.AggregationResult. |
| NutritionRecord.ZINC_TOTAL | Mass | Metric identifier to retrieve the total zinc from androidx.health.connect.client.aggregate.AggregationResult. |
Sleep
| Metric | Value type | Google’s description |
|---|---|---|
| SleepSessionRecord.SLEEP_DURATION_TOTAL | Duration | Metric identifier to retrieve the total sleep session duration from androidx.health.connect.client.aggregate.AggregationResult. |
Vitals
| Metric | Value type | Google’s description |
|---|---|---|
| BloodPressureRecord.DIASTOLIC_AVG | Pressure | Metric identifier to retrieve average diastolic from androidx.health.connect.client.aggregate.AggregationResult. |
| BloodPressureRecord.DIASTOLIC_MAX | Pressure | Metric identifier to retrieve maximum diastolic from androidx.health.connect.client.aggregate.AggregationResult. |
| BloodPressureRecord.DIASTOLIC_MIN | Pressure | Metric identifier to retrieve minimum diastolic from androidx.health.connect.client.aggregate.AggregationResult. |
| BloodPressureRecord.SYSTOLIC_AVG | Pressure | Metric identifier to retrieve average systolic from androidx.health.connect.client.aggregate.AggregationResult. |
| BloodPressureRecord.SYSTOLIC_MAX | Pressure | Metric identifier to retrieve maximum systolic from androidx.health.connect.client.aggregate.AggregationResult. |
| BloodPressureRecord.SYSTOLIC_MIN | Pressure | Metric identifier to retrieve minimum systolic from androidx.health.connect.client.aggregate.AggregationResult. |
| HeartRateRecord.BPM_AVG | Long | Metric identifier to retrieve the average heart rate from AggregationResult. |
| HeartRateRecord.BPM_MAX | Long | Metric identifier to retrieve the maximum heart rate from AggregationResult. |
| HeartRateRecord.BPM_MIN | Long | Metric identifier to retrieve the minimum heart rate from AggregationResult. |
| HeartRateRecord.MEASUREMENTS_COUNT | Long | Metric identifier to retrieve the number of heart rate measurements from AggregationResult. |
| RestingHeartRateRecord.BPM_AVG | Long | Metric identifier to retrieve the average resting heart rate from AggregationResult. |
| RestingHeartRateRecord.BPM_MAX | Long | Metric identifier to retrieve the maximum resting heart rate from AggregationResult. |
| RestingHeartRateRecord.BPM_MIN | Long | Metric identifier to retrieve the minimum resting heart rate from AggregationResult. |
| SkinTemperatureRecord.TEMPERATURE_DELTA_AVG | TemperatureDelta | Metric 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_MAX | TemperatureDelta | Metric 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_MIN | TemperatureDelta | Metric 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
| Metric | Value type | Google’s description |
|---|---|---|
| MindfulnessSessionRecord.MINDFULNESS_DURATION_TOTAL | Duration | Metric 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.