The Google Fit APIs, including the Google Fit REST API, will no longer be available after June 30, 2025. As of May 1, 2024, developers cannot sign up to use these APIs.
"intVal": 1 // Reading wasn't taken before or after a meal
"intVal": 2 // Reading was taken during a fasting period
"intVal": 3 // Reading was taken before a meal
"intVal": 4 // Reading was taken after a meal
"intVal": 1 // User was fully awake
"intVal": 2 // Before the user fell asleep
"intVal": 3 // After the user woke up
"intVal": 4 // While the user was still sleeping
FIELD_TEMPORAL_RELATION_TO_MEAL_GENERAL // Reading wasn't taken before or after a meal
FIELD_TEMPORAL_RELATION_TO_MEAL_FASTING // Reading was taken during a fasting period
FIELD_TEMPORAL_RELATION_TO_MEAL_BEFORE_MEAL // Reading was taken before a meal
FIELD_TEMPORAL_RELATION_TO_MEAL_AFTER_MEAL // Reading was taken after a meal
TEMPORAL_RELATION_TO_SLEEP_FULLY_AWAKE // User was fully awake.
TEMPORAL_RELATION_TO_SLEEP_BEFORE_SLEEP // Before the user fell asleep.
TEMPORAL_RELATION_TO_SLEEP_ON_WAKING // After the user woke up.
TEMPORAL_RELATION_TO_SLEEP_DURING_SLEEP // While the user was still sleeping.
"intVal": 1 // Standing up
"intVal": 2 // Sitting down
"intVal": 3 // Lying down
"intVal": 4 // Reclining
measurement location(int - 枚举)(选填字段)
进行测量的哪支臂和哪支臂。
已接受的值
"intVal": 1 // Left wrist
"intVal": 2 // Right wrist
"intVal": 3 // Left upper arm
"intVal": 4 // Right upper arm
Android
名称
com.google.blood_pressure
数据类型对象
TYPE_BLOOD_PRESSURE
字段(格式 - 单位)
FIELD_BLOOD_PRESSURE_SYSTOLIC(float - mmHg)
收缩压测量值。
FIELD_BLOOD_PRESSURE_DIASTOLIC(float - 毫米汞)
舒张压测量。
FIELD_BODY_POSITION(int - 枚举)(选填字段)
进行测量时用户的身体位置。
已接受的值
BODY_POSITION_STANDING // Standing up
BODY_POSITION_SITTING // Sitting down
BODY_POSITION_LYING_DOWN // Lying down
BODY_POSITION_SEMI_RECUMBENT // Reclining
BLOOD_PRESSURE_MEASUREMENT_LOCATION_LEFT_WRIST // Left wrist
BLOOD_PRESSURE_MEASUREMENT_LOCATION_RIGHT_WRIST // Right wrist
BLOOD_PRESSURE_MEASUREMENT_LOCATION_LEFT_UPPER_ARM // Left upper arm
BLOOD_PRESSURE_MEASUREMENT_LOCATION_RIGHT_UPPER_ARM // Right upper arm
"intVal": 1 // Dry, little or no mucus
"intVal": 2 // Sticky
"intVal": 3 // Creamy
"intVal": 4 // Watery
"intVal": 5 // Clear and stretchy like egg white
宫颈粘液量 (int - 枚举)(可选字段)
用户观察到宫颈粘液的量。
已接受的值
"intVal": 1 // Light
"intVal": 2 // Medium
"intVal": 3 // Heavy
Android
名称
com.google.cervical_mucus
数据类型对象
TYPE_CERVICAL_MUCUS
字段(格式 - 单位)
FIELD_CERVICAL_MUCUS_TEXTURE(int - 枚举)(可选字段)
用户的宫颈粘液的一致性或纹理。
已接受的值
CERVICAL_MUCUS_TEXTURE_DRY // Dry, little or no mucus
CERVICAL_MUCUS_TEXTURE_STICKY // Sticky
CERVICAL_MUCUS_TEXTURE_CREAMY // Creamy
CERVICAL_MUCUS_TEXTURE_WATERY // Watery
CERVICAL_MUCUS_TEXTURE_EGG_WHITE // Clear and stretchy
"intVal": 0 // Unspecified or unknown if user is sleeping.
"intVal": 1 // Awake; user is awake.
"intVal": 2 // Sleeping; generic or non-granular sleep description.
"intVal": 3 // Out of bed; user gets out of bed in the middle of a sleep session.
"intVal": 4 // Light sleep; user is in a light sleep cycle.
"intVal": 5 // Deep sleep; user is in a deep sleep cycle.
"intVal": 6 // REM sleep; user is in a REM sleep cyle.
Android
名称
com.google.sleep.segment
数据类型对象
TYPE_SLEEP_SEGMENT
字段(格式 - 单位)
FIELD_SLEEP_SEGMENT_TYPE(int - 枚举)
表示不同睡眠阶段和类型的值。
已接受的值
SLEEP_SEGMENT_TYPE_UNSPECIFIED // Unspecified or unknown if user is sleeping.
AWAKE // Awake; user is awake.
SLEEP // Sleeping; generic or non-granular sleep description.
OUT_OF_BED // Out of bed; user gets out of bed in the middle of a sleep session.
SLEEP_LIGHT // Light sleep; user is in a light sleep cycle.
SLEEP_DEEP // Deep sleep; user is in a deep sleep cycle.
SLEEP_REM // REM sleep; user is in a REM sleep cyle.
[null,null,["最后更新时间 (UTC):2024-10-15。"],[[["This document details various health data types and their respective fields within Google Fit, including Blood Glucose, Blood Pressure, Body Temperature, and more."],["Each data type is presented with its REST API details and Android equivalent, along with a description of each field's format, units, and accepted values."],["Google Fit allows recording a variety of health metrics like heart rate, height, menstruation details, sleep stages, weight, and more."],["Data is accessible through the Google Fit API, but writing to health data types is currently unavailable pending policy changes."],["Apps accessing health data need to comply with Google's policies and have a verified consent screen to avoid limitations."]]],[]]