# UserActivityState

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/UserActivityState.kt+class:androidx.health.services.client.data.UserActivityState) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

*** ** * ** ***


```
public final class UserActivityState
```

<br />

*** ** * ** ***

Types of user activity states.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState` | `https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState#USER_ACTIVITY_ASLEEP()` The user is asleep. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState` | `https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState#USER_ACTIVITY_EXERCISE()` The user is currently exercising. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState` | `https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState#USER_ACTIVITY_PASSIVE()` The user is awake but is not currently exercising. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState` | `https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState#USER_ACTIVITY_UNKNOWN()` The current activity state cannot be determined, or it is a new state that this library version is too old to recognize. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState#UserActivityState(kotlin.Int,kotlin.String)(int id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState#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/UserActivityState#getId()()` |
| `final @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/UserActivityState#getName()()` |
| `int` | `https://developer.android.com/reference/androidx/health/services/client/data/UserActivityState#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/UserActivityState#toString()()` |

## Public fields

### USER_ACTIVITY_ASLEEP

```
public static final @NonNull UserActivityState USER_ACTIVITY_ASLEEP
```

The user is asleep.

### USER_ACTIVITY_EXERCISE

```
public static final @NonNull UserActivityState USER_ACTIVITY_EXERCISE
```

The user is currently exercising.

### USER_ACTIVITY_PASSIVE

```
public static final @NonNull UserActivityState USER_ACTIVITY_PASSIVE
```

The user is awake but is not currently exercising.

### USER_ACTIVITY_UNKNOWN

```
public static final @NonNull UserActivityState USER_ACTIVITY_UNKNOWN
```

The current activity state cannot be determined, or it is a new state that this library version is too old to recognize.

## Public constructors

### UserActivityState

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

```
public UserActivityState(int id, @NonNull String name)
```

## Public methods

### equals

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

### getId

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

```
public final int getId()
```

### getName

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

```
public final @NonNull String getName()
```

### hashCode

```
public int hashCode()
```

### toString

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