NutritionRecord
  public
  
  final
  
  class
  NutritionRecord
  
  
  
  
  
  
  
    extends IntervalRecord
  
  
  
  
  
  
| java.lang.Object | |||
| ↳ | android.health.connect.datatypes.Record | ||
| ↳ | android.health.connect.datatypes.IntervalRecord | ||
| ↳ | android.health.connect.datatypes.NutritionRecord | ||
Captures what nutrients were consumed as part of a meal or a food item.
Summary
| Nested classes | |
|---|---|
| 
        
        
        
        
        class | NutritionRecord.BuilderBuilder class for  | 
| Fields | |
|---|---|
| 
    public
    static
    final
    AggregationType<Mass> | BIOTIN_TOTALMetric identifier to get total biotin using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | CAFFEINE_TOTALMetric identifier to get total caffeine using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | CALCIUM_TOTALMetric identifier to get total calcium using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | CHLORIDE_TOTALMetric identifier to get total chloride using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | CHOLESTEROL_TOTALMetric identifier to get total cholesterol using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | CHROMIUM_TOTALMetric identifier to get total chromium using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | COPPER_TOTALMetric identifier to get total copper using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | DIETARY_FIBER_TOTALMetric identifier to get total dietary fibre using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Energy> | ENERGY_FROM_FAT_TOTALMetric identifier to get total energy from fat using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Energy> | ENERGY_TOTALMetric identifier to get total energy using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | FOLATE_TOTALMetric identifier to get total folate using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | FOLIC_ACID_TOTALMetric identifier to get total folic acid using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | IODINE_TOTALMetric identifier to get total iodine using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | IRON_TOTALMetric identifier to get total iron using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | MAGNESIUM_TOTALMetric identifier to get total magnesium using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | MANGANESE_TOTALMetric identifier to get total manganese using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | MOLYBDENUM_TOTALMetric identifier to get total molybdenum using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | MONOUNSATURATED_FAT_TOTALMetric identifier to get total monounsaturated fat using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | NIACIN_TOTALMetric identifier to get total niacin using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | PANTOTHENIC_ACID_TOTALMetric identifier to get total pantothenic acid fat using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | PHOSPHORUS_TOTALMetric identifier to get total phosphorus fat using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | POLYUNSATURATED_FAT_TOTALMetric identifier to get total polyunsaturated fat using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | POTASSIUM_TOTALMetric identifier to get total potassium using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | PROTEIN_TOTALMetric identifier to get total protein using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | RIBOFLAVIN_TOTALMetric identifier to get total riboflavin using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | SATURATED_FAT_TOTALMetric identifier to get total saturated fat using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | SELENIUM_TOTALMetric identifier to get total selenium using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | SODIUM_TOTALMetric identifier to get total sodium using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | SUGAR_TOTALMetric identifier to get total sugar using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | THIAMIN_TOTALMetric identifier to get total thiamin using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | TOTAL_CARBOHYDRATE_TOTALMetric identifier to get total carbohydrate using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | TOTAL_FAT_TOTALMetric identifier to get total fat using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | TRANS_FAT_TOTALMetric identifier to get total trans fat using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | UNSATURATED_FAT_TOTALMetric identifier to get total unsaturated fat using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | VITAMIN_A_TOTALMetric identifier to get total Vitamin A using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | VITAMIN_B12_TOTALMetric identifier to get total Vitamin B12 using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | VITAMIN_B6_TOTALMetric identifier to get total Vitamin B6 using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | VITAMIN_C_TOTALMetric identifier to get total Vitamin C using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | VITAMIN_D_TOTALMetric identifier to get total Vitamin D using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | VITAMIN_E_TOTALMetric identifier to get total Vitamin E using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | VITAMIN_K_TOTALMetric identifier to get total Vitamin K using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Mass> | ZINC_TOTALMetric identifier to get total Zinc using aggregate APIs in  | 
| Inherited methods | |
|---|---|
Fields
BIOTIN_TOTAL
public static final AggregationType<Mass> BIOTIN_TOTAL
Metric identifier to get total biotin using aggregate APIs in HealthConnectManager
CAFFEINE_TOTAL
public static final AggregationType<Mass> CAFFEINE_TOTAL
Metric identifier to get total caffeine using aggregate APIs in HealthConnectManager
CALCIUM_TOTAL
public static final AggregationType<Mass> CALCIUM_TOTAL
Metric identifier to get total calcium using aggregate APIs in HealthConnectManager
CHLORIDE_TOTAL
public static final AggregationType<Mass> CHLORIDE_TOTAL
Metric identifier to get total chloride using aggregate APIs in HealthConnectManager
CHOLESTEROL_TOTAL
public static final AggregationType<Mass> CHOLESTEROL_TOTAL
Metric identifier to get total cholesterol using aggregate APIs in HealthConnectManager
CHROMIUM_TOTAL
public static final AggregationType<Mass> CHROMIUM_TOTAL
Metric identifier to get total chromium using aggregate APIs in HealthConnectManager
COPPER_TOTAL
public static final AggregationType<Mass> COPPER_TOTAL
Metric identifier to get total copper using aggregate APIs in HealthConnectManager
DIETARY_FIBER_TOTAL
public static final AggregationType<Mass> DIETARY_FIBER_TOTAL
Metric identifier to get total dietary fibre using aggregate APIs in HealthConnectManager
ENERGY_FROM_FAT_TOTAL
public static final AggregationType<Energy> ENERGY_FROM_FAT_TOTAL
Metric identifier to get total energy from fat using aggregate APIs in HealthConnectManager
ENERGY_TOTAL
public static final AggregationType<Energy> ENERGY_TOTAL
Metric identifier to get total energy using aggregate APIs in HealthConnectManager
FOLATE_TOTAL
public static final AggregationType<Mass> FOLATE_TOTAL
Metric identifier to get total folate using aggregate APIs in HealthConnectManager
FOLIC_ACID_TOTAL
public static final AggregationType<Mass> FOLIC_ACID_TOTAL
Metric identifier to get total folic acid using aggregate APIs in HealthConnectManager
IODINE_TOTAL
public static final AggregationType<Mass> IODINE_TOTAL
Metric identifier to get total iodine using aggregate APIs in HealthConnectManager
IRON_TOTAL
public static final AggregationType<Mass> IRON_TOTAL
Metric identifier to get total iron using aggregate APIs in HealthConnectManager
MAGNESIUM_TOTAL
public static final AggregationType<Mass> MAGNESIUM_TOTAL
Metric identifier to get total magnesium using aggregate APIs in HealthConnectManager
MANGANESE_TOTAL
public static final AggregationType<Mass> MANGANESE_TOTAL
Metric identifier to get total manganese using aggregate APIs in HealthConnectManager
MOLYBDENUM_TOTAL
public static final AggregationType<Mass> MOLYBDENUM_TOTAL
Metric identifier to get total molybdenum using aggregate APIs in HealthConnectManager
MONOUNSATURATED_FAT_TOTAL
public static final AggregationType<Mass> MONOUNSATURATED_FAT_TOTAL
Metric identifier to get total monounsaturated fat using aggregate APIs in HealthConnectManager
NIACIN_TOTAL
public static final AggregationType<Mass> NIACIN_TOTAL
Metric identifier to get total niacin using aggregate APIs in HealthConnectManager
PANTOTHENIC_ACID_TOTAL
public static final AggregationType<Mass> PANTOTHENIC_ACID_TOTAL
Metric identifier to get total pantothenic acid fat using aggregate APIs in HealthConnectManager
PHOSPHORUS_TOTAL
public static final AggregationType<Mass> PHOSPHORUS_TOTAL
Metric identifier to get total phosphorus fat using aggregate APIs in HealthConnectManager
POLYUNSATURATED_FAT_TOTAL
public static final AggregationType<Mass> POLYUNSATURATED_FAT_TOTAL
Metric identifier to get total polyunsaturated fat using aggregate APIs in HealthConnectManager
POTASSIUM_TOTAL
public static final AggregationType<Mass> POTASSIUM_TOTAL
Metric identifier to get total potassium using aggregate APIs in HealthConnectManager
PROTEIN_TOTAL
public static final AggregationType<Mass> PROTEIN_TOTAL
Metric identifier to get total protein using aggregate APIs in HealthConnectManager
RIBOFLAVIN_TOTAL
public static final AggregationType<Mass> RIBOFLAVIN_TOTAL
Metric identifier to get total riboflavin using aggregate APIs in HealthConnectManager
SATURATED_FAT_TOTAL
public static final AggregationType<Mass> SATURATED_FAT_TOTAL
Metric identifier to get total saturated fat using aggregate APIs in HealthConnectManager
SELENIUM_TOTAL
public static final AggregationType<Mass> SELENIUM_TOTAL
Metric identifier to get total selenium using aggregate APIs in HealthConnectManager
SODIUM_TOTAL
public static final AggregationType<Mass> SODIUM_TOTAL
Metric identifier to get total sodium using aggregate APIs in HealthConnectManager
SUGAR_TOTAL
public static final AggregationType<Mass> SUGAR_TOTAL
Metric identifier to get total sugar using aggregate APIs in HealthConnectManager
THIAMIN_TOTAL
public static final AggregationType<Mass> THIAMIN_TOTAL
Metric identifier to get total thiamin using aggregate APIs in HealthConnectManager
TOTAL_CARBOHYDRATE_TOTAL
public static final AggregationType<Mass> TOTAL_CARBOHYDRATE_TOTAL
Metric identifier to get total carbohydrate using aggregate APIs in HealthConnectManager
TOTAL_FAT_TOTAL
public static final AggregationType<Mass> TOTAL_FAT_TOTAL
Metric identifier to get total fat using aggregate APIs in HealthConnectManager
TRANS_FAT_TOTAL
public static final AggregationType<Mass> TRANS_FAT_TOTAL
Metric identifier to get total trans fat using aggregate APIs in HealthConnectManager
UNSATURATED_FAT_TOTAL
public static final AggregationType<Mass> UNSATURATED_FAT_TOTAL
Metric identifier to get total unsaturated fat using aggregate APIs in HealthConnectManager
VITAMIN_A_TOTAL
public static final AggregationType<Mass> VITAMIN_A_TOTAL
Metric identifier to get total Vitamin A using aggregate APIs in HealthConnectManager
VITAMIN_B12_TOTAL
public static final AggregationType<Mass> VITAMIN_B12_TOTAL
Metric identifier to get total Vitamin B12 using aggregate APIs in HealthConnectManager
VITAMIN_B6_TOTAL
public static final AggregationType<Mass> VITAMIN_B6_TOTAL
Metric identifier to get total Vitamin B6 using aggregate APIs in HealthConnectManager
VITAMIN_C_TOTAL
public static final AggregationType<Mass> VITAMIN_C_TOTAL
Metric identifier to get total Vitamin C using aggregate APIs in HealthConnectManager
VITAMIN_D_TOTAL
public static final AggregationType<Mass> VITAMIN_D_TOTAL
Metric identifier to get total Vitamin D using aggregate APIs in HealthConnectManager
VITAMIN_E_TOTAL
public static final AggregationType<Mass> VITAMIN_E_TOTAL
Metric identifier to get total Vitamin E using aggregate APIs in HealthConnectManager
VITAMIN_K_TOTAL
public static final AggregationType<Mass> VITAMIN_K_TOTAL
Metric identifier to get total Vitamin K using aggregate APIs in HealthConnectManager
ZINC_TOTAL
public static final AggregationType<Mass> ZINC_TOTAL
Metric identifier to get total Zinc using aggregate APIs in HealthConnectManager
Public methods
equals
public boolean equals (Object o)
Indicates whether some other object is "equal to" this one.
| Parameters | |
|---|---|
| o | Object: the reference object with which to compare.
 This value may benull. | 
| Returns | |
|---|---|
| boolean | trueif this object is the same as the obj | 
getBiotin
public Mass getBiotin ()
| Returns | |
|---|---|
| Mass | biotin in Massunit.
 This value may benull. | 
getCaffeine
public Mass getCaffeine ()
| Returns | |
|---|---|
| Mass | caffeine in Massunit.
 This value may benull. | 
getCalcium
public Mass getCalcium ()
| Returns | |
|---|---|
| Mass | calcium in Massunit.
 This value may benull. | 
getChloride
public Mass getChloride ()
| Returns | |
|---|---|
| Mass | chloride in Massunit.
 This value may benull. | 
getCholesterol
public Mass getCholesterol ()
| Returns | |
|---|---|
| Mass | cholesterol in Massunit.
 This value may benull. | 
getChromium
public Mass getChromium ()
| Returns | |
|---|---|
| Mass | chromium in Massunit.
 This value may benull. | 
getCopper
public Mass getCopper ()
| Returns | |
|---|---|
| Mass | copper in Massunit.
 This value may benull. | 
getDietaryFiber
public Mass getDietaryFiber ()
| Returns | |
|---|---|
| Mass | dietaryFiber in Massunit.
 This value may benull. | 
getEnergy
public Energy getEnergy ()
| Returns | |
|---|---|
| Energy | energy in Energyunit.
 This value may benull. | 
getEnergyFromFat
public Energy getEnergyFromFat ()
| Returns | |
|---|---|
| Energy | energyFromFat in Energyunit.
 This value may benull. | 
getFolate
public Mass getFolate ()
| Returns | |
|---|---|
| Mass | folate in Massunit.
 This value may benull. | 
getFolicAcid
public Mass getFolicAcid ()
| Returns | |
|---|---|
| Mass | folicAcid in Massunit.
 This value may benull. | 
getIodine
public Mass getIodine ()
| Returns | |
|---|---|
| Mass | iodine in Massunit.
 This value may benull. | 
getIron
public Mass getIron ()
| Returns | |
|---|---|
| Mass | iron in Massunit.
 This value may benull. | 
getMagnesium
public Mass getMagnesium ()
| Returns | |
|---|---|
| Mass | magnesium in Massunit.
 This value may benull. | 
getManganese
public Mass getManganese ()
| Returns | |
|---|---|
| Mass | manganese in Massunit.
 This value may benull. | 
getMealName
public String getMealName ()
| Returns | |
|---|---|
| String | the meal name.
 This value may be null. | 
getMealType
public int getMealType ()
| Returns | |
|---|---|
| int | mealType
 Value is MealType.MEAL_TYPE_UNKNOWN,MealType.MEAL_TYPE_BREAKFAST,MealType.MEAL_TYPE_LUNCH,MealType.MEAL_TYPE_DINNER, orMealType.MEAL_TYPE_SNACK | 
getMolybdenum
public Mass getMolybdenum ()
| Returns | |
|---|---|
| Mass | molybdenum in Massunit.
 This value may benull. | 
getMonounsaturatedFat
public Mass getMonounsaturatedFat ()
| Returns | |
|---|---|
| Mass | monounsaturatedFat in Massunit.
 This value may benull. | 
getNiacin
public Mass getNiacin ()
| Returns | |
|---|---|
| Mass | niacin in Massunit.
 This value may benull. | 
getPantothenicAcid
public Mass getPantothenicAcid ()
| Returns | |
|---|---|
| Mass | pantothenicAcid in Massunit.
 This value may benull. | 
getPhosphorus
public Mass getPhosphorus ()
| Returns | |
|---|---|
| Mass | phosphorus in Massunit.
 This value may benull. | 
getPolyunsaturatedFat
public Mass getPolyunsaturatedFat ()
| Returns | |
|---|---|
| Mass | polyunsaturatedFat in Massunit.
 This value may benull. | 
getPotassium
public Mass getPotassium ()
| Returns | |
|---|---|
| Mass | potassium
 This value may be null. | 
getProtein
public Mass getProtein ()
| Returns | |
|---|---|
| Mass | protein in Massunit.
 This value may benull. | 
getRiboflavin
public Mass getRiboflavin ()
| Returns | |
|---|---|
| Mass | riboflavin in Massunit.
 This value may benull. | 
getSaturatedFat
public Mass getSaturatedFat ()
| Returns | |
|---|---|
| Mass | saturatedFat in Massunit.
 This value may benull. | 
getSelenium
public Mass getSelenium ()
| Returns | |
|---|---|
| Mass | selenium in Massunit.
 This value may benull. | 
getSodium
public Mass getSodium ()
| Returns | |
|---|---|
| Mass | sodium in Massunit.
 This value may benull. | 
getSugar
public Mass getSugar ()
| Returns | |
|---|---|
| Mass | sugar in Massunit.
 This value may benull. | 
getThiamin
public Mass getThiamin ()
| Returns | |
|---|---|
| Mass | thiamin
 This value may be null. | 
getTotalCarbohydrate
public Mass getTotalCarbohydrate ()
| Returns | |
|---|---|
| Mass | totalCarbohydrate in Massunit.
 This value may benull. | 
getTotalFat
public Mass getTotalFat ()
| Returns | |
|---|---|
| Mass | totalFat in Massunit.
 This value may benull. | 
getTransFat
public Mass getTransFat ()
| Returns | |
|---|---|
| Mass | transFat in Massunit.
 This value may benull. | 
getUnsaturatedFat
public Mass getUnsaturatedFat ()
| Returns | |
|---|---|
| Mass | unsaturatedFat
 This value may be null. | 
getVitaminA
public Mass getVitaminA ()
| Returns | |
|---|---|
| Mass | vitaminA in Massunit.
 This value may benull. | 
getVitaminB12
public Mass getVitaminB12 ()
| Returns | |
|---|---|
| Mass | vitaminB12 in Massunit.
 This value may benull. | 
getVitaminB6
public Mass getVitaminB6 ()
| Returns | |
|---|---|
| Mass | vitaminB6 in Massunit.
 This value may benull. | 
getVitaminC
public Mass getVitaminC ()
| Returns | |
|---|---|
| Mass | vitaminC in Massunit.
 This value may benull. | 
getVitaminD
public Mass getVitaminD ()
| Returns | |
|---|---|
| Mass | vitaminD in Massunit.
 This value may benull. | 
getVitaminE
public Mass getVitaminE ()
| Returns | |
|---|---|
| Mass | vitaminE in Massunit.
 This value may benull. | 
getVitaminK
public Mass getVitaminK ()
| Returns | |
|---|---|
| Mass | vitaminK in Massunit.
 This value may benull. | 
getZinc
public Mass getZinc ()
| Returns | |
|---|---|
| Mass | zinc in Massunit.
 This value may benull. | 
hashCode
public int hashCode ()
Returns a hash code value for the object.
| Returns | |
|---|---|
| int | a hash code value for this object. | 
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
