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.Builder
Builder class for |
Fields | |
---|---|
public
static
final
AggregationType<Mass> |
BIOTIN_TOTAL
Metric identifier to get total biotin using aggregate APIs in |
public
static
final
AggregationType<Mass> |
CAFFEINE_TOTAL
Metric identifier to get total caffeine using aggregate APIs in |
public
static
final
AggregationType<Mass> |
CALCIUM_TOTAL
Metric identifier to get total calcium using aggregate APIs in |
public
static
final
AggregationType<Mass> |
CHLORIDE_TOTAL
Metric identifier to get total chloride using aggregate APIs in |
public
static
final
AggregationType<Mass> |
CHOLESTEROL_TOTAL
Metric identifier to get total cholesterol using aggregate APIs in |
public
static
final
AggregationType<Mass> |
CHROMIUM_TOTAL
Metric identifier to get total chromium using aggregate APIs in |
public
static
final
AggregationType<Mass> |
COPPER_TOTAL
Metric identifier to get total copper using aggregate APIs in |
public
static
final
AggregationType<Mass> |
DIETARY_FIBER_TOTAL
Metric identifier to get total dietary fibre using aggregate APIs in |
public
static
final
AggregationType<Energy> |
ENERGY_FROM_FAT_TOTAL
Metric identifier to get total energy from fat using aggregate APIs in |
public
static
final
AggregationType<Energy> |
ENERGY_TOTAL
Metric identifier to get total energy using aggregate APIs in |
public
static
final
AggregationType<Mass> |
FOLATE_TOTAL
Metric identifier to get total folate using aggregate APIs in |
public
static
final
AggregationType<Mass> |
FOLIC_ACID_TOTAL
Metric identifier to get total folic acid using aggregate APIs in |
public
static
final
AggregationType<Mass> |
IODINE_TOTAL
Metric identifier to get total iodine using aggregate APIs in |
public
static
final
AggregationType<Mass> |
IRON_TOTAL
Metric identifier to get total iron using aggregate APIs in |
public
static
final
AggregationType<Mass> |
MAGNESIUM_TOTAL
Metric identifier to get total magnesium using aggregate APIs in |
public
static
final
AggregationType<Mass> |
MANGANESE_TOTAL
Metric identifier to get total manganese using aggregate APIs in |
public
static
final
AggregationType<Mass> |
MOLYBDENUM_TOTAL
Metric identifier to get total molybdenum using aggregate APIs in |
public
static
final
AggregationType<Mass> |
MONOUNSATURATED_FAT_TOTAL
Metric identifier to get total monounsaturated fat using aggregate APIs in |
public
static
final
AggregationType<Mass> |
NIACIN_TOTAL
Metric identifier to get total niacin using aggregate APIs in |
public
static
final
AggregationType<Mass> |
PANTOTHENIC_ACID_TOTAL
Metric identifier to get total pantothenic acid fat using aggregate APIs in |
public
static
final
AggregationType<Mass> |
PHOSPHORUS_TOTAL
Metric identifier to get total phosphorus fat using aggregate APIs in |
public
static
final
AggregationType<Mass> |
POLYUNSATURATED_FAT_TOTAL
Metric identifier to get total polyunsaturated fat using aggregate APIs in |
public
static
final
AggregationType<Mass> |
POTASSIUM_TOTAL
Metric identifier to get total potassium using aggregate APIs in |
public
static
final
AggregationType<Mass> |
PROTEIN_TOTAL
Metric identifier to get total protein using aggregate APIs in |
public
static
final
AggregationType<Mass> |
RIBOFLAVIN_TOTAL
Metric identifier to get total riboflavin using aggregate APIs in |
public
static
final
AggregationType<Mass> |
SATURATED_FAT_TOTAL
Metric identifier to get total saturated fat using aggregate APIs in |
public
static
final
AggregationType<Mass> |
SELENIUM_TOTAL
Metric identifier to get total selenium using aggregate APIs in |
public
static
final
AggregationType<Mass> |
SODIUM_TOTAL
Metric identifier to get total sodium using aggregate APIs in |
public
static
final
AggregationType<Mass> |
SUGAR_TOTAL
Metric identifier to get total sugar using aggregate APIs in |
public
static
final
AggregationType<Mass> |
THIAMIN_TOTAL
Metric identifier to get total thiamin using aggregate APIs in |
public
static
final
AggregationType<Mass> |
TOTAL_CARBOHYDRATE_TOTAL
Metric identifier to get total carbohydrate using aggregate APIs in |
public
static
final
AggregationType<Mass> |
TOTAL_FAT_TOTAL
Metric identifier to get total fat using aggregate APIs in |
public
static
final
AggregationType<Mass> |
TRANS_FAT_TOTAL
Metric identifier to get total trans fat using aggregate APIs in |
public
static
final
AggregationType<Mass> |
UNSATURATED_FAT_TOTAL
Metric identifier to get total unsaturated fat using aggregate APIs in |
public
static
final
AggregationType<Mass> |
VITAMIN_A_TOTAL
Metric identifier to get total Vitamin A using aggregate APIs in |
public
static
final
AggregationType<Mass> |
VITAMIN_B12_TOTAL
Metric identifier to get total Vitamin B12 using aggregate APIs in |
public
static
final
AggregationType<Mass> |
VITAMIN_B6_TOTAL
Metric identifier to get total Vitamin B6 using aggregate APIs in |
public
static
final
AggregationType<Mass> |
VITAMIN_C_TOTAL
Metric identifier to get total Vitamin C using aggregate APIs in |
public
static
final
AggregationType<Mass> |
VITAMIN_D_TOTAL
Metric identifier to get total Vitamin D using aggregate APIs in |
public
static
final
AggregationType<Mass> |
VITAMIN_E_TOTAL
Metric identifier to get total Vitamin E using aggregate APIs in |
public
static
final
AggregationType<Mass> |
VITAMIN_K_TOTAL
Metric identifier to get total Vitamin K using aggregate APIs in |
public
static
final
AggregationType<Mass> |
ZINC_TOTAL
Metric 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. |
Returns | |
---|---|
boolean |
true if this object is the same as the obj |
getBiotin
public Mass getBiotin ()
Returns | |
---|---|
Mass |
biotin in Mass unit.
This value may be null . |
getCaffeine
public Mass getCaffeine ()
Returns | |
---|---|
Mass |
caffeine in Mass unit.
This value may be null . |
getCalcium
public Mass getCalcium ()
Returns | |
---|---|
Mass |
calcium in Mass unit.
This value may be null . |
getChloride
public Mass getChloride ()
Returns | |
---|---|
Mass |
chloride in Mass unit.
This value may be null . |
getCholesterol
public Mass getCholesterol ()
Returns | |
---|---|
Mass |
cholesterol in Mass unit.
This value may be null . |
getChromium
public Mass getChromium ()
Returns | |
---|---|
Mass |
chromium in Mass unit.
This value may be null . |
getCopper
public Mass getCopper ()
Returns | |
---|---|
Mass |
copper in Mass unit.
This value may be null . |
getDietaryFiber
public Mass getDietaryFiber ()
Returns | |
---|---|
Mass |
dietaryFiber in Mass unit.
This value may be null . |
getEnergy
public Energy getEnergy ()
Returns | |
---|---|
Energy |
energy in Energy unit.
This value may be null . |
getEnergyFromFat
public Energy getEnergyFromFat ()
Returns | |
---|---|
Energy |
energyFromFat in Energy unit.
This value may be null . |
getFolate
public Mass getFolate ()
Returns | |
---|---|
Mass |
folate in Mass unit.
This value may be null . |
getFolicAcid
public Mass getFolicAcid ()
Returns | |
---|---|
Mass |
folicAcid in Mass unit.
This value may be null . |
getIodine
public Mass getIodine ()
Returns | |
---|---|
Mass |
iodine in Mass unit.
This value may be null . |
getIron
public Mass getIron ()
Returns | |
---|---|
Mass |
iron in Mass unit.
This value may be null . |
getMagnesium
public Mass getMagnesium ()
Returns | |
---|---|
Mass |
magnesium in Mass unit.
This value may be null . |
getManganese
public Mass getManganese ()
Returns | |
---|---|
Mass |
manganese in Mass unit.
This value may be null . |
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 , or MealType.MEAL_TYPE_SNACK |
getMolybdenum
public Mass getMolybdenum ()
Returns | |
---|---|
Mass |
molybdenum in Mass unit.
This value may be null . |
getMonounsaturatedFat
public Mass getMonounsaturatedFat ()
Returns | |
---|---|
Mass |
monounsaturatedFat in Mass unit.
This value may be null . |
getNiacin
public Mass getNiacin ()
Returns | |
---|---|
Mass |
niacin in Mass unit.
This value may be null . |
getPantothenicAcid
public Mass getPantothenicAcid ()
Returns | |
---|---|
Mass |
pantothenicAcid in Mass unit.
This value may be null . |
getPhosphorus
public Mass getPhosphorus ()
Returns | |
---|---|
Mass |
phosphorus in Mass unit.
This value may be null . |
getPolyunsaturatedFat
public Mass getPolyunsaturatedFat ()
Returns | |
---|---|
Mass |
polyunsaturatedFat in Mass unit.
This value may be null . |
getPotassium
public Mass getPotassium ()
Returns | |
---|---|
Mass |
potassium
This value may be null . |
getProtein
public Mass getProtein ()
Returns | |
---|---|
Mass |
protein in Mass unit.
This value may be null . |
getRiboflavin
public Mass getRiboflavin ()
Returns | |
---|---|
Mass |
riboflavin in Mass unit.
This value may be null . |
getSaturatedFat
public Mass getSaturatedFat ()
Returns | |
---|---|
Mass |
saturatedFat in Mass unit.
This value may be null . |
getSelenium
public Mass getSelenium ()
Returns | |
---|---|
Mass |
selenium in Mass unit.
This value may be null . |
getSodium
public Mass getSodium ()
Returns | |
---|---|
Mass |
sodium in Mass unit.
This value may be null . |
getSugar
public Mass getSugar ()
Returns | |
---|---|
Mass |
sugar in Mass unit.
This value may be null . |
getThiamin
public Mass getThiamin ()
Returns | |
---|---|
Mass |
thiamin
This value may be null . |
getTotalCarbohydrate
public Mass getTotalCarbohydrate ()
Returns | |
---|---|
Mass |
totalCarbohydrate in Mass unit.
This value may be null . |
getTotalFat
public Mass getTotalFat ()
Returns | |
---|---|
Mass |
totalFat in Mass unit.
This value may be null . |
getTransFat
public Mass getTransFat ()
Returns | |
---|---|
Mass |
transFat in Mass unit.
This value may be null . |
getUnsaturatedFat
public Mass getUnsaturatedFat ()
Returns | |
---|---|
Mass |
unsaturatedFat
This value may be null . |
getVitaminA
public Mass getVitaminA ()
Returns | |
---|---|
Mass |
vitaminA in Mass unit.
This value may be null . |
getVitaminB12
public Mass getVitaminB12 ()
Returns | |
---|---|
Mass |
vitaminB12 in Mass unit.
This value may be null . |
getVitaminB6
public Mass getVitaminB6 ()
Returns | |
---|---|
Mass |
vitaminB6 in Mass unit.
This value may be null . |
getVitaminC
public Mass getVitaminC ()
Returns | |
---|---|
Mass |
vitaminC in Mass unit.
This value may be null . |
getVitaminD
public Mass getVitaminD ()
Returns | |
---|---|
Mass |
vitaminD in Mass unit.
This value may be null . |
getVitaminE
public Mass getVitaminE ()
Returns | |
---|---|
Mass |
vitaminE in Mass unit.
This value may be null . |
getVitaminK
public Mass getVitaminK ()
Returns | |
---|---|
Mass |
vitaminK in Mass unit.
This value may be null . |
getZinc
public Mass getZinc ()
Returns | |
---|---|
Mass |
zinc in Mass unit.
This value may be null . |
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-02-10 UTC.