# ExerciseStateInfo

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

*** ** * ** ***


```
class ExerciseStateInfo
```

<br />

*** ** * ** ***

Wrapper class for accessing `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseState` and `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseEndReason`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseStateInfo#ExerciseStateInfo(androidx.health.services.client.data.ExerciseState,kotlin.Int)(exerciseState: https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseState, exerciseEndReason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseStateInfo#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseStateInfo#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseStateInfo#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseStateInfo#endReason()` The `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseEndReason` if `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseStateInfo#state()` is `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseState#ENDED()`, otherwise `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseEndReason.Companion#UNKNOWN()`. |
| `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseState` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseStateInfo#state()` The `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseState`. |

## Public constructors

### ExerciseStateInfo

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

```
ExerciseStateInfo(exerciseState: ExerciseState, exerciseEndReason: Int)
```

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### endReason

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

```
val endReason: Int
```

The `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseEndReason` if `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseStateInfo#state()` is `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseState#ENDED()`, otherwise `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseEndReason.Companion#UNKNOWN()`.

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`

<br />

### state

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

```
val state: ExerciseState
```

The `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseState`. If set to `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseState#ENDED()`, the `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseStateInfo#endReason()` property will contain why it was ended.