List of data types

Stay organized with collections Save and categorize content based on your preferences.

Health Connect supports more than 50 different data types that give users the ability to measure everything from their cycling speeds to their body temperature, and more.

For a full list of available data types, please refer to the Jetpack reference.

The data types Health Connect supports are based on common usage and to provide as much variety as possible. Health Connect aims to offer a comprehensive view and storage of health and fitness data. Before referring to the Jetpack reference, remember that Health Connect's data types fall into the following categories:

  • Activity: This captures any activity that a user does. It can include health and fitness activities like running or swimming, meditation, and sleep.
  • Body Measurement: This captures common data related to the body. It includes capturing a user's weight, or a user's basal metabolic rate, among other data types.
  • Cycle Tracking: This captures menstrual cycles and related data points, such as the binary result of an ovulation test.
  • Nutrition: This captures hydration and nutrition data types. The former represents how much water a user drank in a single drink. The latter includes many optional fields, from calories to sugar and magnesium that record which nutrients the user consumed.
  • Sleep: This captures interval data related to a user's length and type of sleep.
  • Vitals: This captures essential information about the user's general health. It includes everything from blood glucose to body temperature and blood oxygen saturation.

Additional data attributes

Data in the Health Connect API also includes optional attributes described in the following list:

  • Health Connect ID: Each point of data is assigned a unique identifier/UUID reference. This is useful for standard CRUD operations, like deletions.
  • DataOrigin/Device: Health Connect stores information about the device the data came from. For example, it tells you the device’s manufacturer and model.
  • Client ID: To help with conflict resolution and to make syncing easier, Health Connect provides Client IDs so that client applications can refer to data using their own IDs.

Unique Identifier (UID)

Health Connect assigns unique identifiers to newly inserted data objects. This makes it possible to identify data objects and distinguish them from others, especially when used in read, update, or delete requests. UIDs are not identical to Client IDs. Client IDs are assigned by the Client Application and UIDs are assigned exclusively by Health Connect.

Keep in mind

It's important to remember the following additional information when working with UIDs in Health Connect:

  • Sessions have a single UID but data within sessions have their own UIDs.
  • UIDs are not tied to or related to timestamps.
  • Some use cases may require storing a specific UID during a workflow. For example, retrieving the data entry that the user just logged to display it back to them.

Time in Health Connect

All data written to Health Connect should specify Zone Offset information. Specifying Zone Offset enables applications reading the data to represent it in civil time. Civil time is the time that is local to and relevant to the user, not necessarily in Coordinated Universal Time (UTC).

In some rare circumstances, Zone Offset may not be available. When this occurs, it is possible to write to Health Connect without specifying Zone Offset information. This should be avoided where possible.

Setting Time and Zone

Specifying Zone Offset information while writing data (as mentioned previously) provides time zone information when reading data in Health Connect. However, it may fail to do so in certain situations, such as when the Zone Offset is not provided by the writer. Your application should be prepared to deal with both kinds of data, in a way that makes sense for your specific circumstances.

Permissions

Before requesting any permissions, your app must first declare them. See the following table for a full list of mapping from data types to permissions.

For alpha10 and above:

Record class type Read permission declaration Write permission declaration
ActiveCaloriesBurned android.permission.health.READ_ACTIVE_CALORIES_BURNED android.permission.health.WRITE_ACTIVE_CALORIES_BURNED
BasalBodyTemperature android.permission.health.READ_BASAL_BODY_TEMPERATURE android.permission.health.WRITE_BASAL_BODY_TEMPERATURE
BasalMetabolicRate android.permission.health.READ_BASAL_METABOLIC_RATE android.permission.health.WRITE_BASAL_METABOLIC_RATE
BloodGlucose android.permission.health.READ_BLOOD_GLUCOSE android.permission.health.WRITE_BLOOD_GLUCOSE
BloodPressure android.permission.health.READ_BLOOD_PRESSURE android.permission.health.WRITE_BLOOD_PRESSURE
BodyFat android.permission.health.READ_BODY_FAT android.permission.health.WRITE_BODY_FAT
BodyTemperature android.permission.health.READ_BODY_TEMPERATURE android.permission.health.WRITE_BODY_TEMPERATURE
BoneMass android.permission.health.READ_BONE_MASS android.permission.health.WRITE_BONE_MASS
CervicalMucus android.permission.health.READ_CERVICAL_MUCUS android.permission.health.WRITE_CERVICAL_MUCUS
CyclingPedalingCadence android.permission.health.READ_EXERCISE android.permission.health.WRITE_EXERCISE
Distance android.permission.health.READ_DISTANCE android.permission.health.WRITE_DISTANCE
ElevationGained android.permission.health.READ_ELEVATION_GAINED android.permission.health.WRITE_ELEVATION_GAINED
ExerciseSession android.permission.health.READ_EXERCISE android.permission.health.WRITE_EXERCISE
FloorsClimbed android.permission.health.READ_FLOORS_CLIMBED android.permission.health.WRITE_FLOORS_CLIMBED
HeartRate android.permission.health.READ_HEART_RATE android.permission.health.WRITE_HEART_RATE
Height android.permission.health.READ_HEIGHT android.permission.health.WRITE_HEIGHT
Hydration android.permission.health.READ_HYDRATION android.permission.health.WRITE_HYDRATION
LeanBodyMass android.permission.health.READ_LEAN_BODY_MASS android.permission.health.WRITE_LEAN_BODY_MASS
MenstruationFlow android.permission.health.READ_MENSTRUATION android.permission.health.WRITE_MENSTRUATION
MenstruationPeriod android.permission.health.READ_MENSTRUATION android.permission.health.WRITE_MENSTRUATION
Nutrition android.permission.health.READ_NUTRITION android.permission.health.WRITE_NUTRITION
OvulationTest android.permission.health.READ_OVULATION_TEST android.permission.health.WRITE_OVULATION_TEST
OxygenSaturation android.permission.health.READ_OXYGEN_SATURATION android.permission.health.WRITE_OXYGEN_SATURATION
Power android.permission.health.READ_POWER android.permission.health.WRITE_POWER
RespiratoryRate android.permission.health.READ_RESPIRATORY_RATE android.permission.health.WRITE_RESPIRATORY_RATE
RestingHeartRate android.permission.health.READ_RESTING_HEART_RATE android.permission.health.WRITE_RESTING_HEART_RATE
SexualActivity android.permission.health.READ_SEXUAL_ACTIVITY android.permission.health.WRITE_SEXUAL_ACTIVITY
SleepSession android.permission.health.READ_SLEEP android.permission.health.WRITE_SLEEP
SleepStage android.permission.health.READ_SLEEP android.permission.health.WRITE_SLEEP
Speed android.permission.health.READ_SPEED android.permission.health.WRITE_SPEED
StepsCadence android.permission.health.READ_STEPS android.permission.health.WRITE_STEPS
Steps android.permission.health.READ_STEPS android.permission.health.WRITE_STEPS
TotalCaloriesBurned android.permission.health.READ_TOTAL_CALORIES_BURNED android.permission.health.WRITE_TOTAL_CALORIES_BURNED
Vo2Max android.permission.health.READ_VO2_MAX android.permission.health.WRITE_VO2_MAX
Weight android.permission.health.READ_WEIGHT android.permission.health.WRITE_WEIGHT
WheelchairPushes android.permission.health.READ_WHEELCHAIR_PUSHES android.permission.health.WRITE_WHEELCHAIR_PUSHES

For alpha09 and below:

Record class type Read permission declaration Write permission declaration
ActiveCaloriesBurned androidx.health.permission.ActiveCaloriesBurned.READ androidx.health.permission.ActiveCaloriesBurned.WRITE
BasalBodyTemperature androidx.health.permission.BasalBodyTemperature.READ androidx.health.permission.BasalBodyTemperature.WRITE
BasalMetabolicRate androidx.health.permission.BasalMetabolicRate.READ androidx.health.permission.BasalMetabolicRate.WRITE
BloodGlucose androidx.health.permission.BloodGlucose.READ androidx.health.permission.BloodGlucose.WRITE
BloodPressure androidx.health.permission.BloodPressure.READ androidx.health.permission.BloodPressure.WRITE
BodyFat androidx.health.permission.BodyFat.READ androidx.health.permission.BodyFat.WRITE
BodyTemperature androidx.health.permission.BodyTemperature.READ androidx.health.permission.BodyTemperature.WRITE
BoneMass androidx.health.permission.BoneMass.READ androidx.health.permission.BoneMass.WRITE
CervicalMucus androidx.health.permission.CervicalMucus.READ androidx.health.permission.CervicalMucus.WRITE
CyclingPedalingCadence androidx.health.permission.CyclingPedalingCadence.READ androidx.health.permission.CyclingPedalingCadence.WRITE
Distance androidx.health.permission.Distance.READ androidx.health.permission.Distance.WRITE
ElevationGained androidx.health.permission.ElevationGained.READ androidx.health.permission.ElevationGained.WRITE
ExerciseSession androidx.health.permission.ExerciseSession.READ androidx.health.permission.ExerciseSession.WRITE
FloorsClimbed androidx.health.permission.FloorsClimbed.READ androidx.health.permission.FloorsClimbed.WRITE
HeartRate androidx.health.permission.HeartRate.READ androidx.health.permission.HeartRate.WRITE
Height androidx.health.permission.Height.READ androidx.health.permission.Height.WRITE
Hydration androidx.health.permission.Hydration.READ androidx.health.permission.Hydration.WRITE
LeanBodyMass androidx.health.permission.LeanBodyMass.READ androidx.health.permission.LeanBodyMass.WRITE
MenstruationFlow androidx.health.permission.MenstruationFlow.READ androidx.health.permission.MenstruationFlow.WRITE
Nutrition androidx.health.permission.Nutrition.READ androidx.health.permission.Nutrition.WRITE
OvulationTest androidx.health.permission.OvulationTest.READ androidx.health.permission.OvulationTest.WRITE
OxygenSaturation androidx.health.permission.OxygenSaturation.READ androidx.health.permission.OxygenSaturation.WRITE
Power androidx.health.permission.Power.READ androidx.health.permission.Power.WRITE
RespiratoryRate androidx.health.permission.RespiratoryRate.READ androidx.health.permission.RespiratoryRate.WRITE
RestingHeartRate androidx.health.permission.RestingHeartRate.READ androidx.health.permission.RestingHeartRate.WRITE
SexualActivity androidx.health.permission.SexualActivity.READ androidx.health.permission.SexualActivity.WRITE
SleepSession androidx.health.permission.SleepSession.READ androidx.health.permission.SleepSession.WRITE
SleepStage androidx.health.permission.SleepSession.READ androidx.health.permission.SleepSession.WRITE
Speed androidx.health.permission.Speed.READ androidx.health.permission.Speed.WRITE
StepsCadence androidx.health.permission.StepsCadence.READ androidx.health.permission.StepsCadence.WRITE
Steps androidx.health.permission.Steps.READ androidx.health.permission.Steps.WRITE
TotalCaloriesBurned androidx.health.permission.TotalCaloriesBurned.READ androidx.health.permission.TotalCaloriesBurned.WRITE
Vo2Max androidx.health.permission.Vo2Max.READ androidx.health.permission.Vo2Max.WRITE
Weight androidx.health.permission.Weight.READ androidx.health.permission.Weight.WRITE
WheelchairPushes androidx.health.permission.WheelchairPushes.READ androidx.health.permission.WheelchairPushes.WRITE