Health Connect stores and structures both health and fitness data and medical records data. It's important to understand first what data types and permissions Health Connect offers so that you can plan your app's requirements.
After development, when you prepare to publish your app to the Play Store, you must declare your app's data use as well as declare access to the Health Connect data types that your app uses. Otherwise, users might be prompted with an error message where your app can't access the Health Connect data types because they require special approval.
See Complete the health apps declaration in the Play Console for more information.
Data type categories
Health Connect supports data types that are used across most health and fitness apps to provide as much variety as possible. Health Connect aims to offer a comprehensive view and storage of health and fitness data. These data types fall into the following categories:
| Category | Description | |
|---|---|---|
| directions_run | Activity | This captures any activity that a user does. It can include health and fitness activities like running and swimming. |
| straighten | Body Measurement | This captures common data related to the body, such as a user's weight and their basal metabolic rate. |
| fertile | Cycle Tracking | This captures menstrual cycles and related data points, such as the binary result of an ovulation test. |
| grocery | Nutrition | This captures hydration and nutrition data types. The former represents how much water a user consume in a single drink. The latter includes optional fields such as calories, sugar, and magnesium. |
| sleep_auto | Sleep | This captures interval data related to a user's length and type of sleep. |
| vital_signs | Vitals | This captures essential information about the user's general health. It includes data such as body temperature, blood glucose, blood pressure, and blood oxygen saturation. |
| mindfulness | Wellness | This captures data related to a user's mental health and well-being. |
Data type fields
The Health Connect data types table includes several field columns to help you understand the structure and requirements of each data type. These columns are as follows:
| Field | Description | |
|---|---|---|
| schedule | Record Type | Indicates whether the data is recorded at an instant in time or over an interval. The possible values are: Interval, Instantaneous, Series. |
| straighten | Unit | The unit of measurement for the data type (for example, Calories, Meters, Count). |
| star | Mandatory Fields | These are the essential fields that must be included when writing data for this data type to help maintain data integrity and usefulness. |
Health and fitness data types
Before requesting any permissions, your app must declare them in the manifest. See the Declare permissions section of the Quick start guide for more information.
To read data while your app is in the background, or to read historical data, an additional set of read permissions must be declared separately from data type permissions:
| Additional read permission | Permission declaration |
|---|---|
|
Read data in background
Background read example guide |
android.permission.health.READ_HEALTH_DATA_IN_BACKGROUND |
|
Read historical data
Read data older than 30 days guide |
android.permission.health.READ_HEALTH_DATA_HISTORY |
1. Select a Jetpack version
Permission declarations differ between Jetpack versions, make sure to the select the Jetpack version range your app uses.
2. Filter the data types table
The following table contains the full list of data types, each with category, feature flags and guides, and permission declarations.
| Data type Feature guides |
Category | Record type Permission declarations Feature flag |
|---|---|---|
Active calories burned
|
Activity | ActiveCaloriesBurnedRecord
android.permission.health.READ_ACTIVE_CALORIES_BURNED android.permission.health.WRITE_ACTIVE_CALORIES_BURNED Aggregate data typesACTIVE_CALORIES_TOTAL |
Activity intensity
|
Activity | ActivityIntensityRecord
android.permission.health.READ_ACTIVITY_INTENSITY android.permission.health.WRITE_ACTIVITY_INTENSITY FEATURE_ACTIVITY_INTENSITYAggregate data typesDURATION_TOTALINTENSITY_MINUTES_TOTALMODERATE_DURATION_TOTALVIGOROUS_DURATION_TOTAL |
Basal body temperature
|
Cycle Tracking | BasalBodyTemperatureRecord
android.permission.health.READ_BASAL_BODY_TEMPERATURE android.permission.health.WRITE_BASAL_BODY_TEMPERATURE |
Basal metabolic rate
|
Body Measurement | BasalMetabolicRateRecord
android.permission.health.READ_BASAL_METABOLIC_RATE android.permission.health.WRITE_BASAL_METABOLIC_RATE Aggregate data typesBASAL_CALORIES_TOTAL |
Blood glucose
|
Vitals | BloodGlucoseRecord
android.permission.health.READ_BLOOD_GLUCOSE android.permission.health.WRITE_BLOOD_GLUCOSE |
Blood pressure
|
Vitals | BloodPressureRecord
android.permission.health.READ_BLOOD_PRESSURE android.permission.health.WRITE_BLOOD_PRESSURE Aggregate data typesDIASTOLIC_AVGDIASTOLIC_MAXDIASTOLIC_MINSYSTOLIC_AVGSYSTOLIC_MAXSYSTOLIC_MIN |
Body fat
|
Body Measurement | BodyFatRecord
android.permission.health.READ_BODY_FAT android.permission.health.WRITE_BODY_FAT |
Body temperature
|
Vitals | BodyTemperatureRecord
android.permission.health.READ_BODY_TEMPERATURE android.permission.health.WRITE_BODY_TEMPERATURE |
Body water mass
|
Body Measurement | BodyWaterMassRecord
android.permission.health.READ_BODY_WATER_MASS android.permission.health.WRITE_BODY_WATER_MASS |
Bone mass
|
Body Measurement | BoneMassRecord
android.permission.health.READ_BONE_MASS android.permission.health.WRITE_BONE_MASS |
Cervical mucus
|
Cycle Tracking | CervicalMucusRecord
android.permission.health.READ_CERVICAL_MUCUS android.permission.health.WRITE_CERVICAL_MUCUS |
Cycling pedaling cadence
|
Activity | CyclingPedalingCadenceRecord
android.permission.health.READ_EXERCISE android.permission.health.WRITE_EXERCISE Aggregate data typesRPM_AVGRPM_MAXRPM_MIN |
Distance
|
Activity | DistanceRecord
android.permission.health.READ_DISTANCE android.permission.health.WRITE_DISTANCE Aggregate data typesDISTANCE_TOTAL |
Elevation gained
|
Activity | ElevationGainedRecord
android.permission.health.READ_ELEVATION_GAINED android.permission.health.WRITE_ELEVATION_GAINED Aggregate data typesELEVATION_GAINED_TOTAL |
| Exercise Add exercise routes guide
|
Activity | ExerciseSessionRecord
android.permission.health.READ_EXERCISE android.permission.health.READ_EXERCISE_ROUTE android.permission.health.WRITE_EXERCISE android.permission.health.WRITE_EXERCISE_ROUTE Exercise typesView all exercise typesEXERCISE_TYPE_UNKNOWNEXERCISE_TYPE_BADMINTONEXERCISE_TYPE_BASEBALLEXERCISE_TYPE_BASKETBALLEXERCISE_TYPE_BIKINGEXERCISE_TYPE_BIKING_STATIONARYEXERCISE_TYPE_BOOT_CAMPEXERCISE_TYPE_BOXINGEXERCISE_TYPE_CALISTHENICSEXERCISE_TYPE_CRICKETEXERCISE_TYPE_DANCINGEXERCISE_TYPE_ELLIPTICALEXERCISE_TYPE_EXERCISE_CLASSEXERCISE_TYPE_FENCINGEXERCISE_TYPE_FOOTBALL_AMERICANEXERCISE_TYPE_FOOTBALL_AUSTRALIANEXERCISE_TYPE_FRISBEE_DISCEXERCISE_TYPE_GOLFEXERCISE_TYPE_GUIDED_BREATHINGEXERCISE_TYPE_GYMNASTICSEXERCISE_TYPE_HANDBALLEXERCISE_TYPE_HIGH_INTENSITY_INTERVAL_TRAININGEXERCISE_TYPE_HIKINGEXERCISE_TYPE_ICE_HOCKEYEXERCISE_TYPE_ICE_SKATINGEXERCISE_TYPE_MARTIAL_ARTSEXERCISE_TYPE_PADDLINGEXERCISE_TYPE_PARAGLIDINGEXERCISE_TYPE_PILATESEXERCISE_TYPE_RACQUETBALLEXERCISE_TYPE_ROCK_CLIMBINGEXERCISE_TYPE_ROLLER_HOCKEYEXERCISE_TYPE_ROWINGEXERCISE_TYPE_ROWING_MACHINEEXERCISE_TYPE_RUGBYEXERCISE_TYPE_RUNNINGEXERCISE_TYPE_RUNNING_TREADMILLEXERCISE_TYPE_SAILINGEXERCISE_TYPE_SCUBA_DIVINGEXERCISE_TYPE_SKATINGEXERCISE_TYPE_SKIINGEXERCISE_TYPE_SNOWBOARDINGEXERCISE_TYPE_SNOWSHOEINGEXERCISE_TYPE_SOCCEREXERCISE_TYPE_SOFTBALLEXERCISE_TYPE_SQUASHEXERCISE_TYPE_STAIR_CLIMBINGEXERCISE_TYPE_STAIR_CLIMBING_MACHINEEXERCISE_TYPE_STRENGTH_TRAININGEXERCISE_TYPE_STRETCHINGEXERCISE_TYPE_SURFINGEXERCISE_TYPE_SWIMMING_OPEN_WATEREXERCISE_TYPE_SWIMMING_POOLEXERCISE_TYPE_TABLE_TENNISEXERCISE_TYPE_TENNISEXERCISE_TYPE_VOLLEYBALLEXERCISE_TYPE_WALKINGEXERCISE_TYPE_WATER_POLOEXERCISE_TYPE_WEIGHTLIFTINGEXERCISE_TYPE_WHEELCHAIREXERCISE_TYPE_OTHER_WORKOUTEXERCISE_TYPE_YOGAAggregate data typesEXERCISE_DURATION_TOTAL |
Floors climbed
|
Activity | FloorsClimbedRecord
android.permission.health.READ_FLOORS_CLIMBED android.permission.health.WRITE_FLOORS_CLIMBED Aggregate data typesFLOORS_CLIMBED_TOTAL |
Heart rate
|
Vitals | HeartRateRecord
android.permission.health.READ_HEART_RATE android.permission.health.WRITE_HEART_RATE Aggregate data typesBPM_AVGBPM_MAXBPM_MINMEASUREMENTS_COUNT |
Heart rate variability
|
Vitals | HeartRateVariabilityRmssdRecord
android.permission.health.READ_HEART_RATE_VARIABILITY android.permission.health.WRITE_HEART_RATE_VARIABILITY |
Height
|
Body Measurement | HeightRecord
android.permission.health.READ_HEIGHT android.permission.health.WRITE_HEIGHT Aggregate data typesHEIGHT_AVGHEIGHT_MAXHEIGHT_MIN |
Hydration
|
Nutrition | HydrationRecord
android.permission.health.READ_HYDRATION android.permission.health.WRITE_HYDRATION Aggregate data typesVOLUME_TOTAL |
Intermenstrual bleeding
|
Cycle Tracking | IntermenstrualBleedingRecord
android.permission.health.READ_INTERMENSTRUAL_BLEEDING android.permission.health.WRITE_INTERMENSTRUAL_BLEEDING |
Lean body mass
|
Body Measurement | LeanBodyMassRecord
android.permission.health.READ_LEAN_BODY_MASS android.permission.health.WRITE_LEAN_BODY_MASS |
| Menstruation For MenstruationFlowRecord:
For MenstruationPeriodRecord:
|
Cycle Tracking | MenstruationFlowRecord
MenstruationPeriodRecord
android.permission.health.READ_MENSTRUATION android.permission.health.WRITE_MENSTRUATION |
| Mindfulness Track mindfulness guide
|
Wellness | MindfulnessSessionRecord
android.permission.health.READ_MINDFULNESS android.permission.health.WRITE_MINDFULNESS FEATURE_MINDFULNESS_SESSIONAggregate data typesMINDFULNESS_DURATION_TOTAL |
Nutrition
|
Nutrition | NutritionRecord
android.permission.health.READ_NUTRITION android.permission.health.WRITE_NUTRITION Aggregate data typesBIOTIN_TOTALCAFFEINE_TOTALCALCIUM_TOTALCHLORIDE_TOTALCHOLESTEROL_TOTALCHROMIUM_TOTALCOPPER_TOTALDIETARY_FIBER_TOTALENERGY_FROM_FAT_TOTALENERGY_TOTALFOLATE_TOTALFOLIC_ACID_TOTALIODINE_TOTALIRON_TOTALMAGNESIUM_TOTALMANGANESE_TOTALMOLYBDENUM_TOTALMONOUNSATURATED_FAT_TOTALNIACIN_TOTALPANTOTHENIC_ACID_TOTALPHOSPHORUS_TOTALPOLYUNSATURATED_FAT_TOTALPOTASSIUM_TOTALPROTEIN_TOTALRIBOFLAVIN_TOTALSATURATED_FAT_TOTALSELENIUM_TOTALSODIUM_TOTALSUGAR_TOTALTHIAMIN_TOTALTOTAL_CARBOHYDRATE_TOTALTOTAL_FAT_TOTALTRANS_FAT_TOTALUNSATURATED_FAT_TOTALVITAMIN_A_TOTALVITAMIN_B12_TOTALVITAMIN_B6_TOTALVITAMIN_C_TOTALVITAMIN_D_TOTALVITAMIN_E_TOTALVITAMIN_K_TOTALZINC_TOTAL |
Ovulation test
|
Cycle Tracking | OvulationTestRecord
android.permission.health.READ_OVULATION_TEST android.permission.health.WRITE_OVULATION_TEST |
Oxygen saturation
|
Vitals | OxygenSaturationRecord
android.permission.health.READ_OXYGEN_SATURATION android.permission.health.WRITE_OXYGEN_SATURATION |
| Planned exercise Training plans guide
|
Activity | PlannedExerciseSessionRecord
android.permission.health.READ_PLANNED_EXERCISE android.permission.health.WRITE_PLANNED_EXERCISE FEATURE_PLANNED_EXERCISE |
Power
|
Activity | PowerRecord
android.permission.health.READ_POWER android.permission.health.WRITE_POWER Aggregate data typesPOWER_AVGPOWER_MAXPOWER_MIN |
Respiratory rate
|
Vitals | RespiratoryRateRecord
android.permission.health.READ_RESPIRATORY_RATE android.permission.health.WRITE_RESPIRATORY_RATE |
Resting heart rate
|
Vitals | RestingHeartRateRecord
android.permission.health.READ_RESTING_HEART_RATE android.permission.health.WRITE_RESTING_HEART_RATE Aggregate data typesBPM_AVGBPM_MAXBPM_MIN |
Sexual activity
|
Cycle Tracking | SexualActivityRecord
android.permission.health.READ_SEXUAL_ACTIVITY android.permission.health.WRITE_SEXUAL_ACTIVITY |
| Skin temperature Measure skin temperature guide
|
Vitals | SkinTemperatureRecord
android.permission.health.READ_SKIN_TEMPERATURE android.permission.health.WRITE_SKIN_TEMPERATURE FEATURE_SKIN_TEMPERATUREAggregate data typesTEMPERATURE_DELTA_AVGTEMPERATURE_DELTA_MAXTEMPERATURE_DELTA_MIN |
| Sleep session Track sleep sessions guide
|
Sleep | SleepSessionRecord
android.permission.health.READ_SLEEP android.permission.health.WRITE_SLEEP Aggregate data typesSLEEP_DURATION_TOTAL |
Speed
|
Activity | SpeedRecord
android.permission.health.READ_SPEED android.permission.health.WRITE_SPEED Aggregate data typesSPEED_AVGSPEED_MAXSPEED_MIN |
| Steps For StepsRecord:
For StepsCadenceRecord:
|
Activity | StepsRecord
StepsCadenceRecord
android.permission.health.READ_STEPS android.permission.health.WRITE_STEPS Aggregate data types for StepsRecordCOUNT_TOTALAggregate data types for StepsCadenceRecordRATE_AVGRATE_MAXRATE_MIN |
Total calories burned
|
Activity | TotalCaloriesBurnedRecord
android.permission.health.READ_TOTAL_CALORIES_BURNED android.permission.health.WRITE_TOTAL_CALORIES_BURNED Aggregate data typesENERGY_TOTAL |
VO2 max
|
Activity | Vo2MaxRecord
android.permission.health.READ_VO2_MAX android.permission.health.WRITE_VO2_MAX |
Weight
|
Body Measurement | WeightRecord
android.permission.health.READ_WEIGHT android.permission.health.WRITE_WEIGHT Aggregate data typesWEIGHT_AVGWEIGHT_MAXWEIGHT_MIN |
Wheelchair pushes
|
Activity | WheelchairPushesRecord
android.permission.health.READ_WHEELCHAIR_PUSHES android.permission.health.WRITE_WHEELCHAIR_PUSHES Aggregate data typesCOUNT_TOTAL |