# TotalCaloriesBurnedRecord

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/health/connect/client/records/TotalCaloriesBurnedRecord "View this page in Java")

<br />

```
class TotalCaloriesBurnedRecord : 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 companion properties                                                                                                    |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AggregateMetric](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregateMetric)`<`[Energy](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Energy)`>` | [ENERGY_TOTAL](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#ENERGY_TOTAL()) Metric identifier to retrieve total energy from[androidx.health.connect.client.aggregate.AggregationResult](https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregationResult). |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ### Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [TotalCaloriesBurnedRecord](https://developer.android.com/reference/kotlin/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))`(` ` startTime: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`,` ` startZoneOffset: `[ZoneOffset](https://developer.android.com/reference/java/time/ZoneOffset.html)`?,` ` endTime: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`,` ` endZoneOffset: `[ZoneOffset](https://developer.android.com/reference/java/time/ZoneOffset.html)`?,` ` energy: `[Energy](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Energy)`,` ` metadata: `[Metadata](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Metadata) `)` |

|                                        ### Public functions                                         |
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                  | [hashCode](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#hashCode())`()`                                                                                            |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)            | [toString](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#toString())`()`                                                                                            |

|                                                   ### Public properties                                                    |
|----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open `[Instant](https://developer.android.com/reference/java/time/Instant.html)                                           | [endTime](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#endTime()) End time of the record.                                                                                                                                                                                      |
| `open `[ZoneOffset](https://developer.android.com/reference/java/time/ZoneOffset.html)`?`                                  | [endZoneOffset](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#endZoneOffset()) User experienced zone offset at[endTime](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#endTime()), or null if unknown.         |
| [Energy](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Energy)                       | [energy](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#energy()) Energy in[Energy](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Energy)unit.                                                                                             |
| `open `[Metadata](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Metadata) | [metadata](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#metadata()) Set of common metadata associated with the written record.                                                                                                                                                 |
| `open `[Instant](https://developer.android.com/reference/java/time/Instant.html)                                           | [startTime](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#startTime()) Start time of the record.                                                                                                                                                                                |
| `open `[ZoneOffset](https://developer.android.com/reference/java/time/ZoneOffset.html)`?`                                  | [startZoneOffset](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#startZoneOffset()) User experienced zone offset at[startTime](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#startTime()), or null if unknown. |

## Public companion properties

### ENERGY_TOTAL

```
val ENERGY_TOTAL: AggregateMetric<Energy>
```

Metric identifier to retrieve total energy from[androidx.health.connect.client.aggregate.AggregationResult](https://developer.android.com/reference/kotlin/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)  

```
TotalCaloriesBurnedRecord(
    startTime: Instant,
    startZoneOffset: ZoneOffset?,
    endTime: Instant,
    endZoneOffset: ZoneOffset?,
    energy: Energy,
    metadata: Metadata
)
```  

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```  

### hashCode

```
open fun hashCode(): Int
```  

### toString

```
open fun toString(): String
```  

## Public properties

### endTime

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

```
open val endTime: Instant
```

End time of the record.  

### endZoneOffset

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

```
open val endZoneOffset: ZoneOffset?
```

User experienced zone offset at[endTime](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#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.  

### energy

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

```
val energy: Energy
```

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

### metadata

```
open val metadata: Metadata
```

Set of common metadata associated with the written record.  

### startTime

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

```
open val startTime: Instant
```

Start time of the record.  

### startZoneOffset

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

```
open val startZoneOffset: ZoneOffset?
```

User experienced zone offset at[startTime](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/TotalCaloriesBurnedRecord#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.