public enum Lifecycle.State extends Enum

Lifecycle states. You can consider the states as the nodes in a graph and Events as the edges between these nodes.

Summary

Enum Values

CREATED

Created state for a LifecycleOwner.

DESTROYED

Destroyed state for a LifecycleOwner.

INITIALIZED

Initialized state for a LifecycleOwner.

RESUMED

Resumed state for a LifecycleOwner.

STARTED

Started state for a LifecycleOwner.

Enum Values

CREATED

Lifecycle.State Lifecycle.State.CREATED

Created state for a LifecycleOwner. For an android.app.Activity, this state is reached in two cases:

  • after android.app.Activity.onCreate call;

  • right before android.app.Activity.onStop call.

DESTROYED

Lifecycle.State Lifecycle.State.DESTROYED

Destroyed state for a LifecycleOwner. After this event, this Lifecycle will not dispatch any more events. For instance, for an android.app.Activity, this state is reached right before Activity's android.app.Activity.onDestroy call.

INITIALIZED

Lifecycle.State Lifecycle.State.INITIALIZED

Initialized state for a LifecycleOwner. For an android.app.Activity, this is the state when it is constructed but has not received android.app.Activity.onCreate yet.

STARTED

Lifecycle.State Lifecycle.State.STARTED

Started state for a LifecycleOwner. For an android.app.Activity, this state is reached in two cases:

  • after android.app.Activity.onStart call;

  • right before android.app.Activity.onPause call.

Public methods

isAtLeast

public final boolean isAtLeast(@NonNull Lifecycle.State state)

Compares if this State is greater or equal to the given state.

Returns
boolean

true if this State is greater or equal to the given state

valueOf

public final @NonNull Lifecycle.State valueOf(@NonNull String value)

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

values

public final @NonNull Lifecycle.State[] 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.

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 2026-02-19 UTC.