public final class NutritionRecord implements Record


Captures what nutrients were consumed as part of a meal or a food item.

Summary

Public fields

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total biotin from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total caffeine from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total calcium from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total chloride from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total cholesterol from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total chromium from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total copper from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total dietary fiber from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Energy>

Metric identifier to retrieve the total energy from fat from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Energy>

Metric identifier to retrieve the total energy from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total folate from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total folic acid from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total iodine from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total iron from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total magnesium from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total manganese from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total molybdenum from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total monounsaturated fat from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total niacin from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total pantothenic acid from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total phosphorus from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total polyunsaturated fat from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total potassium from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total protein from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total riboflavin from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total saturated fat from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total selenium from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total sodium from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total sugar from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total thiamin from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total total carbohydrate from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total total fat from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total trans fat from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total unsaturated fat from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total vitamin a from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total vitamin b12 from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total vitamin b6 from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total vitamin c from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total vitamin d from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total vitamin e from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total vitamin k from androidx.health.connect.client.aggregate.AggregationResult.

static final @NonNull AggregateMetric<@NonNull Mass>

Metric identifier to retrieve the total zinc from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

NutritionRecord(
    @NonNull Instant startTime,
    ZoneOffset startZoneOffset,
    @NonNull Instant endTime,
    ZoneOffset endZoneOffset,
    @NonNull Metadata metadata,
    Mass biotin,
    Mass caffeine,
    Mass calcium,
    Energy energy,
    Energy energyFromFat,
    Mass chloride,
    Mass cholesterol,
    Mass chromium,
    Mass copper,
    Mass dietaryFiber,
    Mass folate,
    Mass folicAcid,
    Mass iodine,
    Mass iron,
    Mass magnesium,
    Mass manganese,
    Mass molybdenum,
    Mass monounsaturatedFat,
    Mass niacin,
    Mass pantothenicAcid,
    Mass phosphorus,
    Mass polyunsaturatedFat,
    Mass potassium,
    Mass protein,
    Mass riboflavin,
    Mass saturatedFat,
    Mass selenium,
    Mass sodium,
    Mass sugar,
    Mass thiamin,
    Mass totalCarbohydrate,
    Mass totalFat,
    Mass transFat,
    Mass unsaturatedFat,
    Mass vitaminA,
    Mass vitaminB12,
    Mass vitaminB6,
    Mass vitaminC,
    Mass vitaminD,
    Mass vitaminE,
    Mass vitaminK,
    Mass zinc,
    String name,
    int mealType
)

Public methods

boolean
equals(Object other)
final Mass

Biotin in Mass unit.

final Mass

Caffeine in Mass unit.

final Mass

Calcium in Mass unit.

final Mass

Chloride in Mass unit.

final Mass

Cholesterol in Mass unit.

final Mass

Chromium in Mass unit.

final Mass

Copper in Mass unit.

final Mass

Dietary fiber in Mass unit.

@NonNull Instant

End time of the record.

ZoneOffset

User experienced zone offset at endTime, or null if unknown.

final Energy

Energy in Energy unit.

final Energy

Energy from fat in Energy unit.

final Mass

Folate in Mass unit.

final Mass

Folic acid in Mass unit.

final Mass

Iodine in Mass unit.

final Mass

Iron in Mass unit.

final Mass

Magnesium in Mass unit.

final Mass

Manganese in Mass unit.

final int

Type of meal related to the nutrients consumed.

@NonNull Metadata

Set of common metadata associated with the written record.

final Mass