# Stage

Artifact: [androidx.test:monitor](https://developer.android.com/jetpack/androidx/releases/test) [View Source](https://cs.android.com/search?q=file:androidx/test/runner/lifecycle/Stage.java+class:androidx.test.runner.lifecycle.Stage)

*** ** * ** ***


```
public enum Stage
```

<br />

*** ** * ** ***

An enumeration of the lifecycle stages an activity undergoes.

See the `https://developer.android.com/reference/android/app/Activity.html` javadoc for detailed documentation.

## Summary

| ### Enum Values |
|---|---|
| `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage#CREATED` | Indicates that onCreate has been called. |
| `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage#DESTROYED` | Indicates that onDestroy has been called - system is shutting down the activity. |
| `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage#PAUSED` | Indicates that onPause has been called - activity is no longer in the foreground. |
| `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage#PRE_ON_CREATE` | Indicates that onCreate is being called before any onCreate code executes. |
| `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage#RESTARTED` | Indicates that onResume has been called - we have navigated back to the activity. |
| `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage#RESUMED` | Indicates that onResume has been called - activity is now visible to user. |
| `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage#STARTED` | Indicates that onStart has been called. |
| `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage#STOPPED` | Indicates that onStop has been called - activity is no longer visible to the user. |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage` | `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage#valueOf(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` Returns the enum constant of this type with the specified name. |
| `static Stage[]` | `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage#values()()` Returns an array containing the constants of this enum type, in the order they're declared. |

## Enum Values

### CREATED

```
Stage Stage.CREATED
```

Indicates that onCreate has been called.

### DESTROYED

```
Stage Stage.DESTROYED
```

Indicates that onDestroy has been called - system is shutting down the activity.

### PAUSED

```
Stage Stage.PAUSED
```

Indicates that onPause has been called - activity is no longer in the foreground.

### PRE_ON_CREATE

```
Stage Stage.PRE_ON_CREATE
```

Indicates that onCreate is being called before any onCreate code executes.

### RESTARTED

```
Stage Stage.RESTARTED
```

Indicates that onResume has been called - we have navigated back to the activity.

### RESUMED

```
Stage Stage.RESUMED
```

Indicates that onResume has been called - activity is now visible to user.

### STARTED

```
Stage Stage.STARTED
```

Indicates that onStart has been called.

### STOPPED

```
Stage Stage.STOPPED
```

Indicates that onStop has been called - activity is no longer visible to the user.

## Public methods

### valueOf

```
public static Stage valueOf(String name)
```

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/test/runner/lifecycle/Stage` | the enum constant with the specified name |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if this enum type has no constant with the specified name |

### values

```
public static Stage[] values()
```

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

| Returns |
|---|---|
| `Stage[]` | an array containing the constants of this enum type, in the order they're declared |