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

*** ** * ** ***


```
public final class ExerciseStateInfo
```

<br />

*** ** * ** ***

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

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/services/client/data/ExerciseStateInfo#ExerciseStateInfo(androidx.health.services.client.data.ExerciseState,kotlin.Int)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/ExerciseState exerciseState, int exerciseEndReason )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/services/client/data/ExerciseStateInfo#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final int` | `https://developer.android.com/reference/androidx/health/services/client/data/ExerciseStateInfo#getEndReason()()` The `https://developer.android.com/reference/androidx/health/services/client/data/ExerciseEndReason` if `https://developer.android.com/reference/androidx/health/services/client/data/ExerciseStateInfo#state()` is `https://developer.android.com/reference/androidx/health/services/client/data/ExerciseState#ENDED()`, otherwise `https://developer.android.com/reference/androidx/health/services/client/data/ExerciseEndReason.Companion#UNKNOWN()`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/ExerciseState` | `https://developer.android.com/reference/androidx/health/services/client/data/ExerciseStateInfo#getState()()` The `https://developer.android.com/reference/androidx/health/services/client/data/ExerciseState`. |
| `int` | `https://developer.android.com/reference/androidx/health/services/client/data/ExerciseStateInfo#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/services/client/data/ExerciseStateInfo#toString()()` |

## Public constructors

### ExerciseStateInfo

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

```
public ExerciseStateInfo(
    @NonNull ExerciseState exerciseState,
    int exerciseEndReason
)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getEndReason

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

```
public final int getEndReason()
```

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

### getState

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

```
public final @NonNull ExerciseState getState()
```

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

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```