Stay organized with collections
Save and categorize content based on your preferences.
ActiveCaloriesBurnedGoal
class ActiveCaloriesBurnedGoal : ExerciseCompletionGoal
An ExerciseCompletionGoal
that requires a specified number of active calories to be burned.
Summary
Public methods |
Boolean |
|
Energy |
Returns the active calories that must be burned to complete this goal.
|
Int |
|
Public constructors
ActiveCaloriesBurnedGoal
ActiveCaloriesBurnedGoal(activeCalories: Energy)
Parameters |
activeCalories |
Energy: The active calories that must be burnt to complete the goal. This value cannot be null . |
Public methods
equals
fun equals(other: Any?): Boolean
Parameters |
obj |
the reference object with which to compare. |
Return |
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getActiveCalories
fun getActiveCalories(): Energy
Returns the active calories that must be burned to complete this goal.
Return |
Energy |
This value cannot be null . |
hashCode
fun hashCode(): Int
Return |
Int |
a hash code value for this object. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ExerciseCompletionGoal.ActiveCaloriesBurnedGoal\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [U Extensions 13](https://developer.android.com/sdkExtensions)\n\nActiveCaloriesBurnedGoal\n========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/health/connect/datatypes/ExerciseCompletionGoal.ActiveCaloriesBurnedGoal \"View this page in Java\") \n\n```\nclass ActiveCaloriesBurnedGoal : ExerciseCompletionGoal\n```\n\n|---|---|---------------------------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [android.health.connect.datatypes.ExerciseCompletionGoal](/reference/kotlin/android/health/connect/datatypes/ExerciseCompletionGoal) ||\n| | ↳ | [android.health.connect.datatypes.ExerciseCompletionGoal.ActiveCaloriesBurnedGoal](#) |\n\nAn [ExerciseCompletionGoal](/reference/kotlin/android/health/connect/datatypes/ExerciseCompletionGoal) that requires a specified number of active calories to be burned.\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [ActiveCaloriesBurnedGoal](#ActiveCaloriesBurnedGoal(android.health.connect.datatypes.units.Energy))`(`activeCalories:` `[Energy](/reference/kotlin/android/health/connect/datatypes/units/Energy)`)` \u003cbr /\u003e |\n\n| Public methods ||\n|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` \u003cbr /\u003e |\n| [Energy](/reference/kotlin/android/health/connect/datatypes/units/Energy) | [getActiveCalories](#getActiveCalories())`()` Returns the active calories that must be burned to complete this goal. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### ActiveCaloriesBurnedGoal\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [U Extensions 13](https://developer.android.com/sdkExtensions) \n\n```\nActiveCaloriesBurnedGoal(activeCalories: Energy)\n```\n\n| Parameters ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `activeCalories` | [Energy](/reference/kotlin/android/health/connect/datatypes/units/Energy): The active calories that must be burnt to complete the goal. This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### equals\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun equals(other: Any?): Boolean\n```\n\n| Parameters ||\n|-------|---------------------------------------------|\n| `obj` | the reference object with which to compare. |\n\n| Return ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| [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. |\n\n### getActiveCalories\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [U Extensions 13](https://developer.android.com/sdkExtensions) \n\n```\nfun getActiveCalories(): Energy\n```\n\nReturns the active calories that must be burned to complete this goal.\n\n| Return ||\n|---------------------------------------------------------------------------|------------------------------|\n| [Energy](/reference/kotlin/android/health/connect/datatypes/units/Energy) | This value cannot be `null`. |\n\n### hashCode\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun hashCode(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |"]]