# LifecycleOwner

Artifact: [androidx.lifecycle:lifecycle-common](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/LifecycleOwner.kt+class:androidx.lifecycle.LifecycleOwner) Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.0.0)

*** ** * ** ***

Common/AllAndroid/JVM
- Cmn

  ```
  interface LifecycleOwner
  ```
Known direct subclasses [ActivityHolder](https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/activity/ActivityHolder), [ComponentActivity](https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity), [ComponentDialog](https://developer.android.com/reference/kotlin/androidx/activity/ComponentDialog), [Fragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment), [InCallServiceCompat](https://developer.android.com/reference/kotlin/androidx/core/telecom/InCallServiceCompat), [LifecycleRegistryOwner](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleRegistryOwner), [LifecycleResumePauseEffectScope](https://developer.android.com/reference/kotlin/androidx/lifecycle/compose/LifecycleResumePauseEffectScope), [LifecycleService](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleService), [LifecycleStartStopEffectScope](https://developer.android.com/reference/kotlin/androidx/lifecycle/compose/LifecycleStartStopEffectScope), [NavBackStackEntry](https://developer.android.com/reference/kotlin/androidx/navigation/NavBackStackEntry), [OnBackPressedDispatcherOwner](https://developer.android.com/reference/kotlin/androidx/activity/OnBackPressedDispatcherOwner), [ProcessLifecycleOwner](https://developer.android.com/reference/kotlin/androidx/lifecycle/ProcessLifecycleOwner), [SavedStateRegistryOwner](https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistryOwner), [Screen](https://developer.android.com/reference/kotlin/androidx/car/app/Screen), [Session](https://developer.android.com/reference/kotlin/androidx/car/app/Session), [TestLifecycleOwner](https://developer.android.com/reference/kotlin/androidx/lifecycle/testing/TestLifecycleOwner)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/privacysandbox/sdkruntime/core/activity/ActivityHolder` | **This interface is deprecated.** This library is no longer supported. |
| `https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` | Base class for activities that enables composition of higher level components. |
| `https://developer.android.com/reference/kotlin/androidx/activity/ComponentDialog` | Base class for dialogs that enables composition of higher level components. |
| `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` | Static library support version of the framework's `https://developer.android.com/reference/android/app/Fragment.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/telecom/InCallServiceCompat` | This class defines the Jetpack InCallService with the additional ability of defining a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner` |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleRegistryOwner` | **This interface is deprecated.** Use `androidx.appcompat.app.AppCompatActivity` which extends `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`, so there are no use cases for this class. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/compose/LifecycleResumePauseEffectScope` | Receiver scope for `https://developer.android.com/reference/kotlin/androidx/lifecycle/compose/LifecycleResumeEffect.composable#LifecycleResumeEffect(kotlin.Any,androidx.lifecycle.LifecycleOwner,kotlin.Function1)` that offers the `https://developer.android.com/reference/kotlin/androidx/lifecycle/compose/LifecycleResumePauseEffectScope#onPauseOrDispose(kotlin.Function1)` clause to couple the ON_RESUME effect. |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleService` | A Service that is also a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`. |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/compose/LifecycleStartStopEffectScope` | Receiver scope for `https://developer.android.com/reference/kotlin/androidx/lifecycle/compose/LifecycleStartEffect.composable#LifecycleStartEffect(kotlin.Any,androidx.lifecycle.LifecycleOwner,kotlin.Function1)` that offers the `https://developer.android.com/reference/kotlin/androidx/lifecycle/compose/LifecycleStartStopEffectScope#onStopOrDispose(kotlin.Function1)` clause to couple the ON_START effect. |
| `https://developer.android.com/reference/kotlin/androidx/navigation/NavBackStackEntry` | Representation of an entry in the back stack of a `https://developer.android.com/reference/kotlin/androidx/navigation/NavController`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/OnBackPressedDispatcherOwner` | A class that has an `https://developer.android.com/reference/kotlin/androidx/activity/OnBackPressedDispatcher` that allows you to register a `https://developer.android.com/reference/kotlin/androidx/activity/OnBackPressedCallback` for handling the system back button. |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/ProcessLifecycleOwner` | Class that provides lifecycle for the whole application process. |
| `https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistryOwner` | A scope that owns a `https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistry`. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/Screen` | A Screen has a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` and provides the mechanism for the app to send `https://developer.android.com/reference/kotlin/androidx/car/app/model/Template`s to display when the Screen is visible. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/Session` | The base class for implementing a session for a car app. |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/testing/TestLifecycleOwner` | Create a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner` that allows changing the state via the `https://developer.android.com/reference/kotlin/androidx/lifecycle/testing/TestLifecycleOwner#handleLifecycleEvent(androidx.lifecycle.Lifecycle.Event)` method or `https://developer.android.com/reference/kotlin/androidx/lifecycle/testing/TestLifecycleOwner#currentState()` property. |

Known indirect subclasses [AbstractListDetailFragment](https://developer.android.com/reference/kotlin/androidx/navigation/fragment/AbstractListDetailFragment), [AbstractProgressFragment](https://developer.android.com/reference/kotlin/androidx/navigation/dynamicfeatures/fragment/ui/AbstractProgressFragment), [AlertDialog](https://developer.android.com/reference/kotlin/androidx/appcompat/app/AlertDialog), [AmbientModeSupport](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport), [AppCompatActivity](https://developer.android.com/reference/kotlin/androidx/appcompat/app/AppCompatActivity), [AppCompatDialogFragment](https://developer.android.com/reference/kotlin/androidx/appcompat/app/AppCompatDialogFragment), [AppCompatDialog](https://developer.android.com/reference/kotlin/androidx/appcompat/app/AppCompatDialog), [BaseCarAppActivity](https://developer.android.com/reference/kotlin/androidx/car/app/activity/BaseCarAppActivity), [BaseLeanbackPreferenceFragmentCompat](https://developer.android.com/reference/kotlin/androidx/leanback/preference/BaseLeanbackPreferenceFragmentCompat), [BaseSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BaseSupportFragment), [BrandedSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment), [BrowseSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment), [CarAppActivity](https://developer.android.com/reference/kotlin/androidx/car/app/activity/CarAppActivity), [ComponentActivity](https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity), [ComponentDialog](https://developer.android.com/reference/kotlin/androidx/activity/ComponentDialog), [ComposableFragment](https://developer.android.com/reference/kotlin/androidx/navigation/fragment/compose/ComposableFragment), [ComposableNavHostFragment](https://developer.android.com/reference/kotlin/androidx/navigation/fragment/compose/ComposableNavHostFragment), [DefaultProgressFragment](https://developer.android.com/reference/kotlin/androidx/navigation/dynamicfeatures/fragment/ui/DefaultProgressFragment), [DetailsSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/DetailsSupportFragment), [DialogFragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/DialogFragment), [DynamicNavHostFragment](https://developer.android.com/reference/kotlin/androidx/navigation/dynamicfeatures/fragment/DynamicNavHostFragment), [EditTextPreferenceDialogFragmentCompat](https://developer.android.com/reference/kotlin/androidx/preference/EditTextPreferenceDialogFragmentCompat), [EditablePdfViewerFragment](https://developer.android.com/reference/kotlin/androidx/pdf/ink/EditablePdfViewerFragment), [ErrorSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/ErrorSupportFragment), [FragmentActivity](https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity), [Fragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment), [GlanceWearWidgetService](https://developer.android.com/reference/kotlin/androidx/glance/wear/GlanceWearWidgetService), [GuidedStepSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/GuidedStepSupportFragment), [HeadersSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/HeadersSupportFragment), [LauncherActivity](https://developer.android.com/reference/kotlin/androidx/car/app/activity/LauncherActivity), [LeanbackEditTextPreferenceDialogFragmentCompat](https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackEditTextPreferenceDialogFragmentCompat), [LeanbackListPreferenceDialogFragmentCompat](https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackListPreferenceDialogFragmentCompat), [LeanbackPreferenceDialogFragmentCompat](https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackPreferenceDialogFragmentCompat), [LeanbackPreferenceFragmentCompat](https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackPreferenceFragmentCompat), [LeanbackSettingsFragmentCompat](https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackSettingsFragmentCompat), [ListFragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/ListFragment), [ListPreferenceDialogFragmentCompat](https://developer.android.com/reference/kotlin/androidx/preference/ListPreferenceDialogFragmentCompat), [MediaLibraryService](https://developer.android.com/reference/kotlin/androidx/media3/session/MediaLibraryService), [MediaRouteChooserDialogFragment](https://developer.android.com/reference/kotlin/androidx/mediarouter/app/MediaRouteChooserDialogFragment), [MediaRouteChooserDialog](https://developer.android.com/reference/kotlin/androidx/mediarouter/app/MediaRouteChooserDialog), [MediaRouteControllerDialogFragment](https://developer.android.com/reference/kotlin/androidx/mediarouter/app/MediaRouteControllerDialogFragment), [MediaRouteControllerDialog](https://developer.android.com/reference/kotlin/androidx/mediarouter/app/MediaRouteControllerDialog), [MediaRouteDiscoveryFragment](https://developer.android.com/reference/kotlin/androidx/mediarouter/app/MediaRouteDiscoveryFragment), [MediaSessionService](https://developer.android.com/reference/kotlin/androidx/media3/session/MediaSessionService), [MultiSelectListPreferenceDialogFragmentCompat](https://developer.android.com/reference/kotlin/androidx/preference/MultiSelectListPreferenceDialogFragmentCompat), [NavBackStackEntry](https://developer.android.com/reference/kotlin/androidx/navigation/NavBackStackEntry), [NavHostFragment](https://developer.android.com/reference/kotlin/androidx/navigation/fragment/NavHostFragment), [OnboardingSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/OnboardingSupportFragment), [PdfViewerFragment](https://developer.android.com/reference/kotlin/androidx/pdf/viewer/fragment/PdfViewerFragment), [PlaybackSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragment), [PreferenceDialogFragmentCompat](https://developer.android.com/reference/kotlin/androidx/preference/PreferenceDialogFragmentCompat), [PreferenceFragmentCompat](https://developer.android.com/reference/kotlin/androidx/preference/PreferenceFragmentCompat), [PreferenceHeaderFragmentCompat](https://developer.android.com/reference/kotlin/androidx/preference/PreferenceHeaderFragmentCompat), [PreviewActivity](https://developer.android.com/reference/kotlin/androidx/compose/ui/tooling/PreviewActivity), [RowsSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment), [SearchSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchSupportFragment), [VerticalGridSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/VerticalGridSupportFragment), [VideoSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/VideoSupportFragment)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/fragment/AbstractListDetailFragment` | A fragment supports adaptive two-pane layout. |
| `https://developer.android.com/reference/kotlin/androidx/navigation/dynamicfeatures/fragment/ui/AbstractProgressFragment` | The base class for `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment`s that handle dynamic feature installation. |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/app/AlertDialog` | A subclass of Dialog that can display one, two or three buttons. |
| `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport` | **This class is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientLifecycleObserver` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/app/AppCompatActivity` | Base class for activities that wish to use some of the newer platform features on older Android devices. |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/app/AppCompatDialogFragment` | A special version of `https://developer.android.com/reference/kotlin/androidx/fragment/app/DialogFragment` which uses an `https://developer.android.com/reference/kotlin/androidx/appcompat/app/AppCompatDialog` in place of a platform-styled dialog. |
| `https://developer.android.com/reference/kotlin/androidx/appcompat/app/AppCompatDialog` | Base class for AppCompat themed `https://developer.android.com/reference/android/app/Dialog.html`s. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/activity/BaseCarAppActivity` | Core logic for CarAppLibrary Activity interaction with a host. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/preference/BaseLeanbackPreferenceFragmentCompat` | This fragment provides a preference fragment with leanback-style behavior, suitable for embedding into broader UI elements. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/BaseSupportFragment` | Base class for leanback Fragments. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrandedSupportFragment` | Fragment class for managing search and branding using a view that implements `https://developer.android.com/reference/kotlin/androidx/leanback/widget/TitleViewAdapter.Provider`. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment` | A fragment for creating Leanback browse screens. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/activity/CarAppActivity` | The class representing a car app activity in the main display. |
| `https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` | Base class for activities that enables composition of higher level components. |
| `https://developer.android.com/reference/kotlin/androidx/activity/ComponentDialog` | Base class for dialogs that enables composition of higher level components. |
| `https://developer.android.com/reference/kotlin/androidx/navigation/fragment/compose/ComposableFragment` | This class provides a `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` wrapper around a composable function that is loaded via reflection. |
| `https://developer.android.com/reference/kotlin/androidx/navigation/fragment/compose/ComposableNavHostFragment` | A `https://developer.android.com/reference/kotlin/androidx/navigation/fragment/NavHostFragment` that adds support for `https://developer.android.com/reference/kotlin/androidx/navigation/fragment/compose/ComposableFragment` instances via `https://developer.android.com/reference/kotlin/androidx/navigation/fragment/compose/ComposableFragmentNavigator`. |
| `https://developer.android.com/reference/kotlin/androidx/navigation/dynamicfeatures/fragment/ui/DefaultProgressFragment` | The default `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` to display during installation progress. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/DetailsSupportFragment` | A fragment for creating Leanback details screens. |
| `https://developer.android.com/reference/kotlin/androidx/fragment/app/DialogFragment` | A fragment that displays a dialog window, floating in the foreground of its activity's window. |
| `https://developer.android.com/reference/kotlin/androidx/navigation/dynamicfeatures/fragment/DynamicNavHostFragment` | The `https://developer.android.com/reference/kotlin/androidx/navigation/fragment/NavHostFragment` for dynamic features. |
| `https://developer.android.com/reference/kotlin/androidx/preference/EditTextPreferenceDialogFragmentCompat` |   |
| `https://developer.android.com/reference/kotlin/androidx/pdf/ink/EditablePdfViewerFragment` | A `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` that extends `https://developer.android.com/reference/kotlin/androidx/pdf/viewer/fragment/PdfViewerFragment` to provide PDF editing capabilities, including annotation and form filling, leveraging the 'androidx.ink' library. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/ErrorSupportFragment` | A fragment for displaying an error indication. |
| `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity` | Base class for activities that want to use the support-based `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment`. |
| `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` | Static library support version of the framework's `https://developer.android.com/reference/android/app/Fragment.html`. |
| `https://developer.android.com/reference/kotlin/androidx/glance/wear/GlanceWearWidgetService` | Service used for communication between the Host and a Widget Provider. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/GuidedStepSupportFragment` | A GuidedStepSupportFragment is used to guide the user through a decision or series of decisions. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/HeadersSupportFragment` | An fragment containing a list of row headers. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/activity/LauncherActivity` | This class handles providing the right launcher activity when running native applications and Car App Library applications. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackEditTextPreferenceDialogFragmentCompat` | Implemented a dialog to input text. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackListPreferenceDialogFragmentCompat` | Implemented a dialog to show `https://developer.android.com/reference/kotlin/androidx/preference/ListPreference` or `https://developer.android.com/reference/kotlin/androidx/preference/MultiSelectListPreference`. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackPreferenceDialogFragmentCompat` | A fragment that shows `https://developer.android.com/reference/kotlin/androidx/preference/DialogPreference`, for example `https://developer.android.com/reference/kotlin/androidx/preference/ListPreference` or `https://developer.android.com/reference/kotlin/androidx/preference/MultiSelectListPreference`. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackPreferenceFragmentCompat` | This fragment provides a fully decorated leanback-style preference fragment, including a list background and header. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackSettingsFragmentCompat` | This fragment provides a container for displaying a `https://developer.android.com/reference/kotlin/androidx/leanback/preference/LeanbackPreferenceFragmentCompat` |
| `https://developer.android.com/reference/kotlin/androidx/fragment/app/ListFragment` | Static library support version of the framework's `https://developer.android.com/reference/android/app/ListFragment.html`. |
| `https://developer.android.com/reference/kotlin/androidx/preference/ListPreferenceDialogFragmentCompat` |   |
| `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaLibraryService` | Superclass to be extended by services hosting `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaLibraryService.MediaLibrarySession`. |
| `https://developer.android.com/reference/kotlin/androidx/mediarouter/app/MediaRouteChooserDialogFragment` | Media route chooser dialog fragment. |
| `https://developer.android.com/reference/kotlin/androidx/mediarouter/app/MediaRouteChooserDialog` | This class implements the route chooser dialog for `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter`. |
| `https://developer.android.com/reference/kotlin/androidx/mediarouter/app/MediaRouteControllerDialogFragment` | Media route controller dialog fragment. |
| `https://developer.android.com/reference/kotlin/androidx/mediarouter/app/MediaRouteControllerDialog` | This class implements the route controller dialog for `https://developer.android.com/reference/kotlin/androidx/mediarouter/media/MediaRouter`. |
| `https://developer.android.com/reference/kotlin/androidx/mediarouter/app/MediaRouteDiscoveryFragment` | Media route discovery fragment. |
| `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaSessionService` | Superclass to be extended by services hosting `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaSession`. |
| `https://developer.android.com/reference/kotlin/androidx/preference/MultiSelectListPreferenceDialogFragmentCompat` |   |
| `https://developer.android.com/reference/kotlin/androidx/navigation/NavBackStackEntry` | Representation of an entry in the back stack of a `https://developer.android.com/reference/kotlin/androidx/navigation/NavController`. |
| `https://developer.android.com/reference/kotlin/androidx/navigation/fragment/NavHostFragment` | NavHostFragment provides an area within your layout for self-contained navigation to occur. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/OnboardingSupportFragment` | An OnboardingSupportFragment provides a common and simple way to build onboarding screen for applications. |
| `https://developer.android.com/reference/kotlin/androidx/pdf/viewer/fragment/PdfViewerFragment` | A Fragment that renders a PDF document. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragment` | A fragment for displaying playback controls and related content. |
| `https://developer.android.com/reference/kotlin/androidx/preference/PreferenceDialogFragmentCompat` | Abstract base class which presents a dialog associated with a `https://developer.android.com/reference/kotlin/androidx/preference/DialogPreference`. |
| `https://developer.android.com/reference/kotlin/androidx/preference/PreferenceFragmentCompat` | A PreferenceFragmentCompat is the entry point to using the Preference library. |
| `https://developer.android.com/reference/kotlin/androidx/preference/PreferenceHeaderFragmentCompat` | `https://developer.android.com/reference/kotlin/androidx/preference/PreferenceHeaderFragmentCompat` implements a two-pane fragment for preferences. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/tooling/PreviewActivity` | Activity used to run `@Composable` previews from Android Studio. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment` | An ordered set of rows of leanback widgets. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchSupportFragment` | A fragment to handle searches. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/VerticalGridSupportFragment` | A fragment for creating leanback vertical grids. |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/VideoSupportFragment` | Subclass of `https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragment` that is responsible for providing a `https://developer.android.com/reference/android/view/SurfaceView.html` and rendering video. |

*** ** * ** ***

A class that exposes a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle`.

Allows custom components to observe and react to lifecycle changes without tight coupling to the owner's implementation.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` |   |

## Summary

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` | `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#lifecycle()` The `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` of this owner. | Cmn |

| ### Extension functions |
|---|---|---|
| `suspend T` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner.[whenCreated](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).whenCreated(kotlin.coroutines.SuspendFunction1))(block: suspend https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html.() -> T)` **This function is deprecated.** whenCreated has been deprecated because it runs the block on a pausing dispatcher that suspends, rather than cancels work when the lifecycle state goes below the given state. | android |
| `suspend T` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner.[whenResumed](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).whenResumed(kotlin.coroutines.SuspendFunction1))(block: suspend https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html.() -> T)` **This function is deprecated.** whenResumed has been deprecated because it runs the block on a pausing dispatcher that suspends, rather than cancels work when the lifecycle state goes below the given state. | android |
| `suspend T` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner.[whenStarted](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).whenStarted(kotlin.coroutines.SuspendFunction1))(block: suspend https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html.() -> T)` **This function is deprecated.** whenStarted has been deprecated because it runs the block on a pausing dispatcher that suspends, rather than cancels work when the lifecycle state goes below the given state. | android |
| `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner.https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).repeatOnLifecycle(androidx.lifecycle.Lifecycle.State,kotlin.coroutines.SuspendFunction1)( state: https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State, block: suspend https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s extension function for `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.Lifecycle).repeatOnLifecycle(androidx.lifecycle.Lifecycle.State,kotlin.coroutines.SuspendFunction1)` to allow an easier call to the API from LifecycleOwners such as Activities and Fragments. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher<T>` | `<T : https://developer.android.com/reference/android/app/Activity.html & https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner> T.[createManagedSdkActivityLauncher](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(android.app.Activity).createManagedSdkActivityLauncher(kotlin.Function0))( allowLaunch: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** This library is no longer supported. | android |
| `suspend inline R` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner.https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).withCreated(kotlin.Function0)(crossinline block: () -> R)` Run `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withCreated(kotlin.Function0)` with this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` in a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#CREATED` and resume with the result. | Cmn |
| `suspend inline R` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner.https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).withResumed(kotlin.Function0)(crossinline block: () -> R)` Run `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withResumed(kotlin.Function0)` with this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` in a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#RESUMED` and resume with the result. | Cmn |
| `suspend inline R` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner.https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).withStarted(kotlin.Function0)(crossinline block: () -> R)` Run `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withStarted(kotlin.Function0)` with this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` in a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#STARTED` and resume with the result. | Cmn |
| `suspend inline R` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner.https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).withStateAtLeast(androidx.lifecycle.Lifecycle.State,kotlin.Function0)( state: https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State, crossinline block: () -> R )` Run `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withStateAtLeast(androidx.lifecycle.Lifecycle.State,kotlin.Function0)` with this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` in a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withStateAtLeast(androidx.lifecycle.Lifecycle.State,kotlin.Function0)` and resume with the result. | Cmn |

| ### Extension properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleCoroutineScope` | `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner.https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).lifecycleScope()` `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html` tied to this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle`. | Cmn |

## Public properties

### lifecycle

Cmn Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.0.0)

```
val lifecycle: Lifecycle
```

The `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` of this owner.

## Extension functions

### LifecycleOwner.whenCreated

android Artifact: [androidx.lifecycle:lifecycle-common](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/PausingDispatcher.jvm.kt+function:whenCreated)

```
suspend fun <T : Any?> LifecycleOwner.[whenCreated](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).whenCreated(kotlin.coroutines.SuspendFunction1))(block: suspend CoroutineScope.() -> T): T
```

> [!CAUTION]
> **This function is deprecated.**   
> whenCreated has been deprecated because it runs the block on a pausing dispatcher that suspends, rather than cancels work when the lifecycle state goes below the given state. Use withCreated for non-suspending work that needs to run only once when the Lifecycle changes.

Runs the given block when the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` is at least in `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#CREATED` state.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.Lifecycle).whenStateAtLeast(androidx.lifecycle.Lifecycle.State,kotlin.coroutines.SuspendFunction1)` | for details |

### LifecycleOwner.whenResumed

android Artifact: [androidx.lifecycle:lifecycle-common](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/PausingDispatcher.jvm.kt+function:whenResumed)

```
suspend fun <T : Any?> LifecycleOwner.[whenResumed](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).whenResumed(kotlin.coroutines.SuspendFunction1))(block: suspend CoroutineScope.() -> T): T
```

> [!CAUTION]
> **This function is deprecated.**   
> whenResumed has been deprecated because it runs the block on a pausing dispatcher that suspends, rather than cancels work when the lifecycle state goes below the given state. Use withResumed for non-suspending work that needs to run only once when the Lifecycle changes.

Runs the given block when the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` is at least in `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#RESUMED` state.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.Lifecycle).whenStateAtLeast(androidx.lifecycle.Lifecycle.State,kotlin.coroutines.SuspendFunction1)` | for details |

### LifecycleOwner.whenStarted

android Artifact: [androidx.lifecycle:lifecycle-common](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/PausingDispatcher.jvm.kt+function:whenStarted)

```
suspend fun <T : Any?> LifecycleOwner.[whenStarted](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(androidx.lifecycle.LifecycleOwner).whenStarted(kotlin.coroutines.SuspendFunction1))(block: suspend CoroutineScope.() -> T): T
```

> [!CAUTION]
> **This function is deprecated.**   
> whenStarted has been deprecated because it runs the block on a pausing dispatcher that suspends, rather than cancels work when the lifecycle state goes below the given state. Use withStarted for non-suspending work that needs to run only once when the Lifecycle changes.

Runs the given block when the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` is at least in `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#STARTED` state.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.Lifecycle).whenStateAtLeast(androidx.lifecycle.Lifecycle.State,kotlin.coroutines.SuspendFunction1)` | for details |

### LifecycleOwner.repeatOnLifecycle

Cmn Artifact: [androidx.lifecycle:lifecycle-runtime](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/RepeatOnLifecycle.kt+function:repeatOnLifecycle)

```
suspend fun LifecycleOwner.repeatOnLifecycle(
    state: Lifecycle.State,
    block: suspend CoroutineScope.() -> Unit
): Unit
```

`https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s extension function for `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.Lifecycle).repeatOnLifecycle(androidx.lifecycle.Lifecycle.State,kotlin.coroutines.SuspendFunction1)` to allow an easier call to the API from LifecycleOwners such as Activities and Fragments.

```kotlin
class MyActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        /* ... */
        // Runs the block of code in a coroutine when the lifecycle is at least STARTED.
        // The coroutine will be cancelled when the ON_STOP event happens and will
        // restart executing if the lifecycle receives the ON_START event again.
        lifecycleScope.launch {
            repeatOnLifecycle(Lifecycle.State.STARTED) {
                uiStateFlow.collect { uiState ->
                    updateUi(uiState)
                }
            }
        }
    }
}
```

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.Lifecycle).repeatOnLifecycle(androidx.lifecycle.Lifecycle.State,kotlin.coroutines.SuspendFunction1)` |   |

### T.createManagedSdkActivityLauncher

android Artifact: [androidx.privacysandbox.activity:activity-client](https://developer.android.com/jetpack/androidx/releases/privacysandbox-activity) [View Source](https://cs.android.com/search?q=file:androidx/privacysandbox/activity/client/SdkActivityLaunchers.kt+function:createManagedSdkActivityLauncher)

```
fun <T : Activity & LifecycleOwner> T.[createManagedSdkActivityLauncher](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#(android.app.Activity).createManagedSdkActivityLauncher(kotlin.Function0))(
    allowLaunch: () -> Boolean
): LocalManagedSdkActivityLauncher<T>
```

> [!CAUTION]
> **This function is deprecated.**   
> This library is no longer supported.

Returns a lifecycle-aware SdkActivityLauncher that launches activities on behalf of an SDK by using this activity as a starting context. The created launcher will be automatically disposed when the current activity is destroyed, with no additional work required.

| Parameters |
|---|---|
| `<T : https://developer.android.com/reference/android/app/Activity.html & https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner>` | the current `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner` activity from which new SDK activities will be launched. If this activity is destroyed, any further SDK activity launches will simply be ignored, and `https://developer.android.com/reference/kotlin/androidx/privacysandbox/activity/client/LocalManagedSdkActivityLauncher#launchSdkActivity(android.os.IBinder)` will return 'false'. |
| `allowLaunch: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | predicate called each time an activity is about to be launched by the SDK, the activity will only be launched if it returns true. |

### LifecycleOwner.withCreated

Cmn Artifact: [androidx.lifecycle:lifecycle-runtime](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/WithLifecycleState.kt+function:withCreated)

```
suspend inline fun <R : Any?> LifecycleOwner.withCreated(crossinline block: () -> R): R
```

Run `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withCreated(kotlin.Function0)` with this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` in a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#CREATED` and resume with the result. Throws the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleDestroyedException` if the lifecycle has reached `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#DESTROYED` by the time of the call or before `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withCreated(kotlin.Function0)` is able to run.

### LifecycleOwner.withResumed

Cmn Artifact: [androidx.lifecycle:lifecycle-runtime](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/WithLifecycleState.kt+function:withResumed)

```
suspend inline fun <R : Any?> LifecycleOwner.withResumed(crossinline block: () -> R): R
```

Run `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withResumed(kotlin.Function0)` with this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` in a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#RESUMED` and resume with the result. Throws the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleDestroyedException` if the lifecycle has reached `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#DESTROYED` by the time of the call or before `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withResumed(kotlin.Function0)` is able to run.

### LifecycleOwner.withStarted

Cmn Artifact: [androidx.lifecycle:lifecycle-runtime](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/WithLifecycleState.kt+function:withStarted)

```
suspend inline fun <R : Any?> LifecycleOwner.withStarted(crossinline block: () -> R): R
```

Run `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withStarted(kotlin.Function0)` with this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` in a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#STARTED` and resume with the result. Throws the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleDestroyedException` if the lifecycle has reached `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#DESTROYED` by the time of the call or before `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withStarted(kotlin.Function0)` is able to run.

### LifecycleOwner.withStateAtLeast

Cmn Artifact: [androidx.lifecycle:lifecycle-runtime](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/WithLifecycleState.kt+function:withStateAtLeast)

```
suspend inline fun <R : Any?> LifecycleOwner.withStateAtLeast(
    state: Lifecycle.State,
    crossinline block: () -> R
): R
```

Run `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withStateAtLeast(androidx.lifecycle.Lifecycle.State,kotlin.Function0)` with this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` in a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State` of at least `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withStateAtLeast(androidx.lifecycle.Lifecycle.State,kotlin.Function0)` and resume with the result. Throws the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleDestroyedException` if the lifecycle has reached `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#DESTROYED` by the time of the call or before `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.LifecycleOwner).withStateAtLeast(androidx.lifecycle.Lifecycle.State,kotlin.Function0)` is able to run.

## Extension properties

### LifecycleOwner.lifecycleScope

Cmn Artifact: [androidx.lifecycle:lifecycle-common](https://developer.android.com/jetpack/androidx/releases/lifecycle) [View Source](https://cs.android.com/search?q=file:androidx/lifecycle/LifecycleOwner.kt+symbol:lifecycleScope) Added in [2.6.0](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.0)

```
val LifecycleOwner.lifecycleScope: LifecycleCoroutineScope
```

`https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html` tied to this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner`'s `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle`.

Canceled when the `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` is destroyed. Bound to `Dispatchers.Main.immediate`.