Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
营养数据类型
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
营养数据的数据类型。
水合
每个数据点代表用户单次摄入的水量。
REST
| 名称 | com.google.hydration |
| OAuth 权限范围 |
https://www.googleapis.com/auth/fitness.nutrition.read
https://www.googleapis.com/auth/fitness.nutrition.write
|
| 字段(格式 - 单位) |
卷 (float - 升)
摄入的水量。 |
Android
| 名称 | com.google.hydration |
| 数据类型对象 | TYPE_HYDRATION |
| 字段(格式 - 单位) |
FIELD_VOLUME (float - 升)
摄入的液体量。 |
营养
每个数据点代表作为膳食或食物的一部分被人摄入的营养素。数据点包含多个字段。营养素字段是必填字段。膳食类型和食物字段必须填写一个或全部填写。
REST
| 名称 | com.google.nutrition |
| OAuth 权限范围 |
https://www.googleapis.com/auth/fitness.nutrition.read
https://www.googleapis.com/auth/fitness.nutrition.write
|
| 字段(格式 - 单位) |
膳食类型 (int - 枚举)(可选字段)
用户吃的膳食类型。
已接受的值
"intVal": 1 // Unknown
"intVal": 2 // Breakfast
"intVal": 3 // Lunch
"intVal": 4 // Dinner
"intVal": 5 // Snack
|
食物 (string - 不适用)条目的具体食物。例如,“香蕉”或“粥”。
|
营养素 (Map<String> - 卡路里/克)
所吃食物的营养成分。
已接受的值
"key": "calories" // Calories in kcal
"key": "fat.total" // Total fat in grams
"key": "fat.saturated" // Saturated fat in grams
"key": "fat.unsaturated" // Unsaturated fat in grams
"key": "fat.polyunsaturated" // Polyunsaturated fat in grams
"key": "fat.monounsaturated" // Monounsaturated fat in grams
"key": "fat.trans" // Trans fat in grams
"key": "cholesterol" // Cholesterol in milligrams
"key": "sodium" // Sodium in milligrams
"key": "potassium" // Potassium in milligrams
"key": "carbs.total" // Total carbohydrates in grams
"key": "dietary_fiber" // Dietary fiber in grams
"key": "sugar" // Amount of sugar in grams
"key": "protein" // Protein amount in grams
|
|
Android
| 名称 | com.google.nutrition |
| 数据类型对象 | TYPE_NUTRITION |
| 字段(格式 - 单位) |
FIELD_MEAL_TYPE (int - 枚举)(可选字段)
用户吃的膳食类型。
已接受的值
MEAL_TYPE_UNKNOWN // Unknown
MEAL_TYPE_BREAKFAST // Breakfast
MEAL_TYPE_LUNCH // Lunch
MEAL_TYPE_DINNER // Dinner
MEAL_TYPE_SNACK // Snack
|
FIELD_FOOD_ITEM (string - 自由格式文本)
条目的食物说明。例如,“香蕉”或“粥”。
|
FIELD_NUTRIENTS (Map<String> - 千卡/克/毫克)
所吃食物的营养成分。
已接受的值
NUTRIENT_CALORIES // Calories in kcal
NUTRIENT_TOTAL_FAT // Total fat in grams
NUTRIENT_SATURATED_FAT // Saturated fat in grams
NUTRIENT_UNSATURATED_FAT // Unsaturated fat in grams
NUTRIENT_POLYUNSATURATED_FAT // Polyunsaturated fat in grams
NUTRIENT_MONOUNSATURATED_FAT // Monounsaturated fat in grams
NUTRIENT_TRANS_FAT // Trans fat in grams
NUTRIENT_CHOLESTEROL // Cholesterol in milligrams
NUTRIENT_SODIUM // Sodium in milligrams
NUTRIENT_POTASSIUM // Potassium in milligrams
NUTRIENT_TOTAL_CARBS // Total carbohydrates in grams
NUTRIENT_DIETARY_FIBER // Dietary fiber in grams
NUTRIENT_SUGAR // Amount of sugar in grams
NUTRIENT_PROTEIN // Protein amount in grams
|
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-05-13。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2026-05-13。"],[],[]]