# ExerciseCompletionGoal.ActiveCaloriesBurnedGoal

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[U Extensions 13](https://developer.android.com/sdkExtensions)

# ActiveCaloriesBurnedGoal

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/health/connect/datatypes/ExerciseCompletionGoal.ActiveCaloriesBurnedGoal "View this page in Java")  

```
class ActiveCaloriesBurnedGoal : ExerciseCompletionGoal
```

|---|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                                                          |||
| ↳ | [android.health.connect.datatypes.ExerciseCompletionGoal](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/ExerciseCompletionGoal)                                                       ||
|   | ↳ | [android.health.connect.datatypes.ExerciseCompletionGoal.ActiveCaloriesBurnedGoal](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/ExerciseCompletionGoal.ActiveCaloriesBurnedGoal#) |

An[ExerciseCompletionGoal](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/ExerciseCompletionGoal)that requires a specified number of active calories to be burned.

## Summary

|                                                                                                                                                                             Public constructors                                                                                                                                                                             ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [ActiveCaloriesBurnedGoal](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/ExerciseCompletionGoal.ActiveCaloriesBurnedGoal#ActiveCaloriesBurnedGoal(android.health.connect.datatypes.units.Energy))`(`activeCalories:` `[Energy](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/units/Energy)`)` <br /> |

|                                                                                                                                                                            Public methods                                                                                                                                                                             ||
|--------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                     | [equals](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/ExerciseCompletionGoal.ActiveCaloriesBurnedGoal#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` <br /> |
| [Energy](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/units/Energy) | [getActiveCalories](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/ExerciseCompletionGoal.ActiveCaloriesBurnedGoal#getActiveCalories())`()` Returns the active calories that must be burned to complete this goal.           |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                             | [hashCode](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/ExerciseCompletionGoal.ActiveCaloriesBurnedGoal#hashCode())`()` <br />                                                                                             |

## Public constructors

### ActiveCaloriesBurnedGoal

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[U Extensions 13](https://developer.android.com/sdkExtensions)  

```
ActiveCaloriesBurnedGoal(activeCalories: Energy)
```

|                                                                                                    Parameters                                                                                                     ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `activeCalories` | [Energy](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/units/Energy):The active calories that must be burnt to complete the goal. This value cannot be`null`. |

## Public methods

### equals

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

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

|                     Parameters                     ||
|-------|---------------------------------------------|
| `obj` | the reference object with which to compare. |

|                                                                           Return                                                                           ||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true`if this object is the same as the obj argument;`false`otherwise. |

### getActiveCalories

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[U Extensions 13](https://developer.android.com/sdkExtensions)  

```
fun getActiveCalories(): Energy
```

Returns the active calories that must be burned to complete this goal.

|                                                               Return                                                                ||
|--------------------------------------------------------------------------------------------------------|-----------------------------|
| [Energy](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/units/Energy) | This value cannot be`null`. |

### hashCode

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

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

|                                                     Return                                                     ||
|----------------------------------------------------------------------------|------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |