ActiveCaloriesBurnedRecord


public final class ActiveCaloriesBurnedRecord implements Record


Captures the estimated active energy burned by the user (in kilocalories), excluding basal metabolic rate (BMR). Each record represents the total kilocalories burned over a time interval, so both the start and end times should be set.

Summary

Public fields

static final @NonNull AggregateMetric<@NonNull Energy>

Metric identifier to retrieve total active calories burned from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

ActiveCaloriesBurnedRecord(
    @NonNull Instant startTime,
    ZoneOffset startZoneOffset,
    @NonNull Instant endTime,
    ZoneOffset endZoneOffset,
    @NonNull Energy energy,
    @NonNull Metadata metadata
)

Public methods

boolean
equals(Object other)
@NonNull Instant

End time of the record.

ZoneOffset

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

final @NonNull Energy

Energy in Energy unit.

@NonNull Metadata

Set of common metadata associated with the written record.

@NonNull Instant

Start time of the record.

ZoneOffset

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

int
@NonNull String

Public fields

ACTIVE_CALORIES_TOTAL

public static final @NonNull AggregateMetric<@NonNull EnergyACTIVE_CALORIES_TOTAL

Metric identifier to retrieve total active calories burned from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

ActiveCaloriesBurnedRecord

Added in 1.1.0-alpha10
public ActiveCaloriesBurnedRecord(
    @NonNull Instant startTime,
    ZoneOffset startZoneOffset,
    @NonNull Instant endTime,
    ZoneOffset endZoneOffset,
    @NonNull Energy energy,
    @NonNull Metadata metadata
)

Public methods

equals

public boolean equals(Object other)

getEndTime

Added in 1.1.0-alpha10
public @NonNull Instant getEndTime()

End time of the record.

getEndZoneOffset

Added in 1.1.0-alpha10
public ZoneOffset getEndZoneOffset()

User experienced zone offset at endTime, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.

getEnergy

Added in 1.1.0-alpha10
public final @NonNull Energy getEnergy()

Energy in Energy unit. Required field. Valid range: 0-1000000 kcal.

getMetadata

Added in 1.1.0-alpha10
public @NonNull Metadata getMetadata()

Set of common metadata associated with the written record.

getStartTime

Added in 1.1.0-alpha10
public @NonNull Instant getStartTime()

Start time of the record.

getStartZoneOffset

Added in 1.1.0-alpha10
public ZoneOffset getStartZoneOffset()

User experienced zone offset at startTime, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.

hashCode

public int hashCode()

toString

public @NonNull String toString()