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
|
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間: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"]],["上次更新時間:2026-05-13 (世界標準時間)。"],[],[]]