# TotalCaloriesBurnedRecord

Artifact: [androidx.health.connect:connect-client](https://developer.android.com/jetpack/androidx/releases/health-connect) [View Source](https://cs.android.com/search?q=file:androidx/health/connect/client/records/TotalCaloriesBurnedRecord.kt+class:androidx.health.connect.client.records.TotalCaloriesBurnedRecord) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***


```
public final class TotalCaloriesBurnedRecord implements Record
```

<br />

*** ** * ** ***

Total energy burned by the user (in kilocalories), including active \& basal energy burned (BMR). Each record represents the total kilocalories burned over a time interval.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregateMetric<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Energy>` | `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#ENERGY_TOTAL()` Metric identifier to retrieve total energy from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#TotalCaloriesBurnedRecord(java.time.Instant,java.time.ZoneOffset,java.time.Instant,java.time.ZoneOffset,androidx.health.connect.client.units.Energy,androidx.health.connect.client.records.metadata.Metadata)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html startTime, https://developer.android.com/reference/java/time/ZoneOffset.html startZoneOffset, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html endTime, https://developer.android.com/reference/java/time/ZoneOffset.html endZoneOffset, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Energy energy, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Metadata metadata )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#getEndTime()()` End time of the record. |
| `https://developer.android.com/reference/java/time/ZoneOffset.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#getEndZoneOffset()()` User experienced zone offset at `https://developer.android.com/reference/androidx/health/connect/client/records/IntervalRecord#endTime()`, or null if unknown. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Energy` | `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#getEnergy()()` Energy in `https://developer.android.com/reference/androidx/health/connect/client/units/Energy` unit. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Metadata` | `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#getMetadata()()` Set of common metadata associated with the written record. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#getStartTime()()` Start time of the record. |
| `https://developer.android.com/reference/java/time/ZoneOffset.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#getStartZoneOffset()()` User experienced zone offset at `https://developer.android.com/reference/androidx/health/connect/client/records/IntervalRecord#startTime()`, or null if unknown. |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#toString()()` |

## Public fields

### ENERGY_TOTAL

```
public static final @NonNull AggregateMetric<@NonNull Energy> ENERGY_TOTAL
```

Metric identifier to retrieve total energy from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`.

## Public constructors

### TotalCaloriesBurnedRecord

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public TotalCaloriesBurnedRecord(
    @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](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public @NonNull Instant getEndTime()
```

End time of the record.

### getEndZoneOffset

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public ZoneOffset getEndZoneOffset()
```

User experienced zone offset at `https://developer.android.com/reference/androidx/health/connect/client/records/IntervalRecord#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](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public final @NonNull Energy getEnergy()
```

Energy in `https://developer.android.com/reference/androidx/health/connect/client/units/Energy` unit. Required field. Valid range: 0-1000000 kcal.

### getMetadata

```
public @NonNull Metadata getMetadata()
```

Set of common metadata associated with the written record.

### getStartTime

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public @NonNull Instant getStartTime()
```

Start time of the record.

### getStartZoneOffset

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public ZoneOffset getStartZoneOffset()
```

User experienced zone offset at `https://developer.android.com/reference/androidx/health/connect/client/records/IntervalRecord#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()
```