# ComponentActivity

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/ComponentActivity.kt+class:androidx.activity.ComponentActivity) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/activity#1.0.0)

*** ** * ** ***


```
public class ComponentActivity extends Activity implements LifecycleOwner, ContextAware, ViewModelStoreOwner, HasDefaultViewModelProviderFactory, SavedStateRegistryOwner, OnBackPressedDispatcherOwner, NavigationEventDispatcherOwner, ActivityResultRegistryOwner, ActivityResultCaller, OnConfigurationChangedProvider, OnTrimMemoryProvider, OnNewIntentProvider, OnMultiWindowModeChangedProvider, PictureInPictureProvider, MenuHost, FullyDrawnReporterOwner
```

<br />

|---|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||||
| ↳ | [android.content.Context](https://developer.android.com/reference/android/content/Context.html) |||||
|   | ↳ | [android.content.ContextWrapper](https://developer.android.com/reference/android/content/ContextWrapper.html) ||||
|   |   | ↳ | [android.view.ContextThemeWrapper](https://developer.android.com/reference/android/view/ContextThemeWrapper.html) |||
|   |   |   | ↳ | [android.app.Activity](https://developer.android.com/reference/android/app/Activity.html) ||
|   |   |   |   | ↳ | [androidx.activity.ComponentActivity](https://developer.android.com/reference/androidx/activity/ComponentActivity) |

Known direct subclasses [FragmentActivity](https://developer.android.com/reference/androidx/fragment/app/FragmentActivity)

|---|---|
| `https://developer.android.com/reference/androidx/fragment/app/FragmentActivity` | Base class for activities that want to use the support-based `https://developer.android.com/reference/androidx/fragment/app/Fragment`. |

Known indirect subclasses [AppCompatActivity](https://developer.android.com/reference/androidx/appcompat/app/AppCompatActivity), [BaseCarAppActivity](https://developer.android.com/reference/androidx/car/app/activity/BaseCarAppActivity), [CarAppActivity](https://developer.android.com/reference/androidx/car/app/activity/CarAppActivity), [LauncherActivity](https://developer.android.com/reference/androidx/car/app/activity/LauncherActivity)

|---|---|
| `https://developer.android.com/reference/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/androidx/car/app/activity/BaseCarAppActivity` | Core logic for CarAppLibrary Activity interaction with a host. |
| `https://developer.android.com/reference/androidx/car/app/activity/CarAppActivity` | The class representing a car app activity in the main display. |
| `https://developer.android.com/reference/androidx/car/app/activity/LauncherActivity` | This class handles providing the right launcher activity when running native applications and Car App Library applications. |

*** ** * ** ***

Base class for activities that enables composition of higher level components.

Rather than all functionality being built directly into this class, only the minimal set of lower level building blocks are included. Higher level components can then be used as needed without enforcing a deep Activity class hierarchy or strong coupling between components.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/activity/ComponentActivity#ComponentActivity()()` |
| `@https://developer.android.com/reference/androidx/annotation/ContentView https://developer.android.com/reference/androidx/activity/ComponentActivity#ComponentActivity(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/LayoutRes int contentLayoutId)` Alternate constructor that can be used to provide a default layout that will be inflated as part of `super.onCreate(savedInstanceState)`. |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addContentView(android.view.View,android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/View.html view, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html params)` |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addMenuProvider(androidx.core.view.MenuProvider)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/view/MenuProvider provider)` Adds the given `https://developer.android.com/reference/androidx/core/view/MenuProvider` to this `https://developer.android.com/reference/androidx/core/view/MenuHost`. |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addMenuProvider(androidx.core.view.MenuProvider,androidx.lifecycle.LifecycleOwner)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/view/MenuProvider provider, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/LifecycleOwner owner )` Adds the given `https://developer.android.com/reference/androidx/core/view/MenuProvider` to this `https://developer.android.com/reference/androidx/core/view/MenuHost`. |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addMenuProvider(androidx.core.view.MenuProvider,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.Lifecycle.State)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/view/MenuProvider provider, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/LifecycleOwner owner, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/Lifecycle.State state )` Adds the given `https://developer.android.com/reference/androidx/core/view/MenuProvider` to this `https://developer.android.com/reference/androidx/core/view/MenuHost` once the given `https://developer.android.com/reference/androidx/lifecycle/LifecycleOwner` reaches the given `https://developer.android.com/reference/androidx/lifecycle/Lifecycle.State`. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnConfigurationChangedListener(androidx.core.util.Consumer)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html> listener )` Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/content/ComponentCallbacks.html#onConfigurationChanged(android.content.res.Configuration)` with the new `https://developer.android.com/reference/android/content/res/Configuration.html`. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/contextaware/OnContextAvailableListener listener )` {@inheritDoc} |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnMultiWindowModeChangedListener(androidx.core.util.Consumer)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo> listener )` Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/app/Activity.html#onMultiWindowModeChanged(boolean)` with the new `https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo`. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnNewIntentListener(androidx.core.util.Consumer)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html> listener)` Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/app/Activity.html#onNewIntent(android.content.Intent)` with the new `https://developer.android.com/reference/android/content/Intent.html`. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnPictureInPictureModeChangedListener(androidx.core.util.Consumer)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureModeChangedInfo> listener )` Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/app/Activity.html#onPictureInPictureModeChanged(boolean)` with the new `https://developer.android.com/reference/androidx/core/app/PictureInPictureModeChangedInfo`. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnPictureInPictureUiStateChangedListener(androidx.core.util.Consumer)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureUiStateCompat> listener )` Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/app/Activity.html#onPictureInPictureUiStateChanged(android.app.PictureInPictureUiState)` with the new `https://developer.android.com/reference/androidx/core/app/PictureInPictureUiStateCompat`. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnTrimMemoryListener(androidx.core.util.Consumer)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> listener)` Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)` with the `int` representing the level of trimming. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnUserLeaveHintListener(java.lang.Runnable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Runnable.html listener)` Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/app/Activity.html#onUserLeaveHint()` |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#enterPictureInPictureMode(androidx.core.app.PictureInPictureParamsCompat)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureParamsCompat params)` Available since API 24 in the framework Activity class, puts the activity in picture-in-picture mode if possible in the current system state. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultRegistry` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#getActivityResultRegistry()()` Get the `https://developer.android.com/reference/androidx/activity/result/ActivityResultRegistry` associated with this activity. |
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#getDefaultViewModelArgs()()` The default arguments `https://developer.android.com/reference/android/os/Bundle.html` to pass to `https://developer.android.com/reference/androidx/lifecycle/package-summary#DEFAULT_ARGS_KEY()` in `https://developer.android.com/reference/androidx/activity/ComponentActivity#defaultViewModelCreationExtras()`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/viewmodel/CreationExtras` | `@https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/activity/ComponentActivity#getDefaultViewModelCreationExtras()()` {@inheritDoc} |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/ViewModelProvider.Factory` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#getDefaultViewModelProviderFactory()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/FullyDrawnReporter` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#getFullyDrawnReporter()()` Retrieve the `https://developer.android.com/reference/androidx/activity/FullyDrawnReporter` that should handle the independent parts of the UI that separately report that they are fully drawn. |
| `https://developer.android.com/reference/java/lang/Object.html` | `[getLastCustomNonConfigurationInstance](https://developer.android.com/reference/androidx/activity/ComponentActivity#getLastCustomNonConfigurationInstance())()` **This method is deprecated.** Use a {@link androidx.lifecycle.ViewModel} to store non config state. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/Lifecycle` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#getLifecycle()()` {@inheritDoc} |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#getNavigationEventDispatcher()()` Lazily provides a `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` for back navigation handling, including support for predictive back gestures introduced in Android 13 (API 33+). |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/OnBackPressedDispatcher` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#getOnBackPressedDispatcher()()` Retrieve the `https://developer.android.com/reference/androidx/activity/OnBackPressedDispatcher` that will be triggered when `https://developer.android.com/reference/androidx/activity/ComponentActivity#onBackPressed()` is called. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/savedstate/SavedStateRegistry` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#getSavedStateRegistry()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/ViewModelStore` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#getViewModelStore()()` Returns the `https://developer.android.com/reference/androidx/lifecycle/ViewModelStore` associated with this activity |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/activity/ComponentActivity#initializeViewTreeOwners()()` Sets the view tree owners before setting the content view so that the inflation process and attach listeners will see them already present. |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#invalidateMenu()()` Invalidates the `https://developer.android.com/reference/android/view/Menu.html` to ensure that what is displayed matches the current internal state of the menu. |
| `void` | `@https://developer.android.com/reference/androidx/annotation/MainThread @https://developer.android.com/reference/androidx/annotation/CallSuper [onBackPressed](https://developer.android.com/reference/androidx/activity/ComponentActivity#onBackPressed())()` **This method is deprecated.** This method has been deprecated in favor of using the {@link OnBackPressedDispatcher} via {@link #getOnBackPressedDispatcher()}. |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/activity/ComponentActivity#onConfigurationChanged(android.content.res.Configuration)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html newConfig)` {@inheritDoc} |
| `boolean` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#onCreatePanelMenu(kotlin.Int,android.view.Menu)(int featureId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Menu.html menu)` |
| `boolean` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#onMenuItemSelected(kotlin.Int,android.view.MenuItem)(int featureId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MenuItem.html item)` |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper [onMultiWindowModeChanged](https://developer.android.com/reference/androidx/activity/ComponentActivity#onMultiWindowModeChanged(kotlin.Boolean))(boolean isInMultiWindowMode)` **This method is deprecated.** Deprecated in android.app.Activity |
| `void` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(api = 26) @https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/activity/ComponentActivity#onMultiWindowModeChanged(kotlin.Boolean,android.content.res.Configuration)( boolean isInMultiWindowMode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html newConfig )` {@inheritDoc} |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#onPanelClosed(kotlin.Int,android.view.Menu)(int featureId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Menu.html menu)` |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper [onPictureInPictureModeChanged](https://developer.android.com/reference/androidx/activity/ComponentActivity#onPictureInPictureModeChanged(kotlin.Boolean))(boolean isInPictureInPictureMode)` **This method is deprecated.** Deprecated in android.app.Activity |
| `void` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(api = 26) @https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/activity/ComponentActivity#onPictureInPictureModeChanged(kotlin.Boolean,android.content.res.Configuration)( boolean isInPictureInPictureMode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html newConfig )` {@inheritDoc} |
| `void` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(api = 31) @https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/activity/ComponentActivity#onPictureInPictureUiStateChanged(android.app.PictureInPictureUiState)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/PictureInPictureUiState.html pipState )` {@inheritDoc} |
| `boolean` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#onPreparePanel(kotlin.Int,android.view.View,android.view.Menu)(int featureId, https://developer.android.com/reference/android/view/View.html view, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Menu.html menu)` |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper [onRequestPermissionsResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#onRequestPermissionsResult(kotlin.Int,kotlin.Array,kotlin.IntArray))( int requestCode, @https://developer.android.com/reference/androidx/annotation/NonNull String[] permissions, @https://developer.android.com/reference/androidx/annotation/NonNull int[] grantResults )` **This method is deprecated.** This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. |
| `https://developer.android.com/reference/java/lang/Object.html` | `[onRetainCustomNonConfigurationInstance](https://developer.android.com/reference/androidx/activity/ComponentActivity#onRetainCustomNonConfigurationInstance())()` **This method is deprecated.** Use a {@link androidx.lifecycle.ViewModel} to store non config state. |
| `final https://developer.android.com/reference/java/lang/Object.html` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#onRetainNonConfigurationInstance()()` Retain all appropriate non-config state. |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/activity/ComponentActivity#onTrimMemory(kotlin.Int)(int level)` {@inheritDoc} |
| `https://developer.android.com/reference/android/content/Context.html` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#peekAvailableContext()()` Get the `https://developer.android.com/reference/android/content/Context.html` if it is currently available. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultLauncher<@https://developer.android.com/reference/androidx/annotation/NonNull I>` | `<I extends https://developer.android.com/reference/java/lang/Object.html, O extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/activity/ComponentActivity#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,androidx.activity.result.ActivityResultCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContract<@https://developer.android.com/reference/androidx/annotation/NonNull I, @https://developer.android.com/reference/androidx/annotation/NonNull O> contract, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultCallback<@https://developer.android.com/reference/androidx/annotation/NonNull O> callback )` Register a request to `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`, designated by the given `https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContract`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultLauncher<@https://developer.android.com/reference/androidx/annotation/NonNull I>` | `<I extends https://developer.android.com/reference/java/lang/Object.html, O extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/activity/ComponentActivity#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,androidx.activity.result.ActivityResultRegistry,androidx.activity.result.ActivityResultCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContract<@https://developer.android.com/reference/androidx/annotation/NonNull I, @https://developer.android.com/reference/androidx/annotation/NonNull O> contract, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultRegistry registry, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultCallback<@https://developer.android.com/reference/androidx/annotation/NonNull O> callback )` Register a request to `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`, designated by the given `https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContract`. |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#removeMenuProvider(androidx.core.view.MenuProvider)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/view/MenuProvider provider)` Removes the given `https://developer.android.com/reference/androidx/core/view/MenuProvider` from this `https://developer.android.com/reference/androidx/core/view/MenuHost`. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#removeOnConfigurationChangedListener(androidx.core.util.Consumer)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html> listener )` Remove a previously added listener. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#removeOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/contextaware/OnContextAvailableListener listener )` Remove a `https://developer.android.com/reference/androidx/activity/contextaware/OnContextAvailableListener` previously added via `https://developer.android.com/reference/androidx/activity/contextaware/ContextAware#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)`. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#removeOnMultiWindowModeChangedListener(androidx.core.util.Consumer)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo> listener )` Remove a previously added listener. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#removeOnNewIntentListener(androidx.core.util.Consumer)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html> listener)` Remove a previously added listener. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#removeOnPictureInPictureModeChangedListener(androidx.core.util.Consumer)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureModeChangedInfo> listener )` Remove a previously added listener. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#removeOnPictureInPictureUiStateChangedListener(androidx.core.util.Consumer)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureUiStateCompat> listener )` Remove a previously added listener. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#removeOnTrimMemoryListener(androidx.core.util.Consumer)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> listener)` Remove a previously added listener. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#removeOnUserLeaveHintListener(java.lang.Runnable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Runnable.html listener)` Remove a previously added listener. |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#reportFullyDrawn()()` |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#setContentView(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/LayoutRes int layoutResID)` |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#setContentView(android.view.View)(https://developer.android.com/reference/android/view/View.html view)` |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#setContentView(android.view.View,android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/View.html view, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html params)` |
| `final void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#setPictureInPictureParams(androidx.core.app.PictureInPictureParamsCompat)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureParamsCompat params)` Available since API 26 in the framework Activity class, updates the properties of the picture-in-picture activity, or sets it to be used later when `https://developer.android.com/reference/androidx/core/app/PictureInPictureProvider#enterPictureInPictureMode(androidx.core.app.PictureInPictureParamsCompat)` is called |
| `void` | `[startActivityForResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#startActivityForResult(android.content.Intent,kotlin.Int))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, int requestCode)` **This method is deprecated.** This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. |
| `void` | `[startActivityForResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#startActivityForResult(android.content.Intent,kotlin.Int,android.os.Bundle))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, int requestCode, https://developer.android.com/reference/android/os/Bundle.html options )` **This method is deprecated.** This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. |
| `void` | `[startIntentSenderForResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#startIntentSenderForResult(android.content.IntentSender,kotlin.Int,android.content.Intent,kotlin.Int,kotlin.Int,kotlin.Int))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentSender.html intent, int requestCode, https://developer.android.com/reference/android/content/Intent.html fillInIntent, int flagsMask, int flagsValues, int extraFlags )` **This method is deprecated.** This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. |
| `void` | `[startIntentSenderForResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#startIntentSenderForResult(android.content.IntentSender,kotlin.Int,android.content.Intent,kotlin.Int,kotlin.Int,kotlin.Int,android.os.Bundle))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentSender.html intent, int requestCode, https://developer.android.com/reference/android/content/Intent.html fillInIntent, int flagsMask, int flagsValues, int extraFlags, https://developer.android.com/reference/android/os/Bundle.html options )` **This method is deprecated.** This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. |

| ### Protected methods |
|---|---|
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper [onActivityResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#onActivityResult(kotlin.Int,kotlin.Int,android.content.Intent))(int requestCode, int resultCode, https://developer.android.com/reference/android/content/Intent.html data)` **This method is deprecated.** This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. |
| `void` | `https://developer.android.com/reference/androidx/activity/ComponentActivity#onCreate(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)` {@inheritDoc} |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/activity/ComponentActivity#onNewIntent(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` {@inheritDoc} |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/activity/ComponentActivity#onSaveInstanceState(android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html outState)` |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/activity/ComponentActivity#onUserLeaveHint()()` {@inheritDoc} |

| ### Extension functions |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-lazy/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull VM>` | `@https://developer.android.com/reference/androidx/annotation/MainThread <VM extends https://developer.android.com/reference/androidx/lifecycle/ViewModel> https://developer.android.com/reference/androidx/activity/ActivityViewModelLazyKt.https://developer.android.com/reference/androidx/activity/ComponentActivity#(androidx.activity.ComponentActivity).viewModels(kotlin.Function0,kotlin.Function0)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/ComponentActivity receiver, Function0<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/viewmodel/CreationExtras> extrasProducer, Function0<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/ViewModelProvider.Factory> factoryProducer )` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-lazy/index.html` delegate to access the ComponentActivity's ViewModel, if `https://developer.android.com/reference/androidx/activity/package-summary#(androidx.activity.ComponentActivity).viewModels(kotlin.Function0,kotlin.Function0)` is specified then `https://developer.android.com/reference/androidx/lifecycle/ViewModelProvider.Factory` returned by it will be used to create `https://developer.android.com/reference/androidx/lifecycle/ViewModel` first time. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-lazy/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull T>` | `@https://developer.android.com/reference/androidx/annotation/MainThread <T extends https://developer.android.com/reference/androidx/lifecycle/ViewModel> https://developer.android.com/reference/androidx/activity/ActivityViewModelLazyKt.https://developer.android.com/reference/androidx/activity/ComponentActivity#(androidx.activity.ComponentActivity).viewModels(kotlin.String,kotlin.Function0,kotlin.Function0)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/ComponentActivity receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, Function0<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/viewmodel/CreationExtras> extrasProducer, Function0<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/ViewModelProvider.Factory> factoryProducer )` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-lazy/index.html` delegate for this `https://developer.android.com/reference/androidx/activity/ComponentActivity`'s `https://developer.android.com/reference/androidx/lifecycle/ViewModel` identified by `https://developer.android.com/reference/androidx/activity/package-summary#(androidx.activity.ComponentActivity).viewModels(kotlin.String,kotlin.Function0,kotlin.Function0)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/biometric/AuthenticationResultLauncher` | `https://developer.android.com/reference/androidx/activity/AuthenticationUtils.https://developer.android.com/reference/androidx/activity/ComponentActivity#(androidx.activity.ComponentActivity).registerForAuthenticationResult(androidx.biometric.AuthenticationResultCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/ComponentActivity receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/biometric/AuthenticationResultCallback resultCallback )` Returns an `https://developer.android.com/reference/androidx/biometric/AuthenticationResultLauncher` that can be used to initiate authentication. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/biometric/AuthenticationResultLauncher` | `https://developer.android.com/reference/androidx/activity/AuthenticationUtils.https://developer.android.com/reference/androidx/activity/ComponentActivity#(androidx.activity.ComponentActivity).registerForAuthenticationResult(java.util.concurrent.Executor,androidx.biometric.AuthenticationResultCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/ComponentActivity receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html callbackExecutor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/biometric/AuthenticationResultCallback resultCallback )` Returns an `https://developer.android.com/reference/androidx/biometric/AuthenticationResultLauncher` that can be used to initiate authentication. |
| `final void` | `https://developer.android.com/reference/androidx/activity/ContentPip.https://developer.android.com/reference/androidx/activity/ComponentActivity#(androidx.activity.ComponentActivity).disablePipOnAppSwitch(androidx.core.pip.contentpip.ContentPipToken)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/ComponentActivity receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/contentpip/ContentPipToken contentPipToken )` Disables entering PiP on app switch for this Activity with Content PiP. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/contentpip/ContentPipToken` | `https://developer.android.com/reference/androidx/activity/ContentPip.https://developer.android.com/reference/androidx/activity/ComponentActivity#(androidx.activity.ComponentActivity).enablePipOnAppSwitch(androidx.core.pip.contentpip.ContentPipCallback)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/ComponentActivity receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/contentpip/ContentPipCallback callback )` Enables entering PiP on app switch for this Activity with Content PiP. |
| `final void` | `https://developer.android.com/reference/androidx/activity/EdgeToEdge.[enableEdgeToEdge](https://developer.android.com/reference/androidx/activity/ComponentActivity#(androidx.activity.ComponentActivity).enableEdgeToEdge(androidx.activity.SystemBarStyle,androidx.activity.SystemBarStyle))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/ComponentActivity receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/SystemBarStyle statusBarStyle, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/SystemBarStyle navigationBarStyle )` **This method is deprecated.** Use {@link WindowCompat#enableEdgeToEdge(Window)} to enable edge-to-edge display. |

### Inherited methods

From [android.app.Activity](https://developer.android.com/reference/android/app/Activity.html) `void` `https://developer.android.com/reference/android/app/Activity.html#attachBaseContext(android.content.Context)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html newBase)` `void` `https://developer.android.com/reference/android/app/Activity.html#clearOverrideActivityTransition(int)(int overrideType)` `void` `https://developer.android.com/reference/android/app/Activity.html#closeContextMenu()()` `void` `https://developer.android.com/reference/android/app/Activity.html#closeOptionsMenu()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/PendingIntent.html` `https://developer.android.com/reference/android/app/Activity.html#createPendingResult(int, android.content.Intent, int)(int requestCode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html data, int flags)` `final void` `https://developer.android.com/reference/android/app/Activity.html#dismissDialog(int)(int id)` `final void` `https://developer.android.com/reference/android/app/Activity.html#dismissKeyboardShortcutsHelper()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#dispatchGenericMotionEvent(android.view.MotionEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MotionEvent.html ev)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html event)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#dispatchTouchEvent(android.view.MotionEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MotionEvent.html ev)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#dispatchTrackballEvent(android.view.MotionEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MotionEvent.html ev)` `void` `https://developer.android.com/reference/android/app/Activity.html#dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[])(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html prefix,
https://developer.android.com/reference/java/io/FileDescriptor.html fd,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintWriter.html writer,
String[] args
)` `void` `https://developer.android.com/reference/android/app/Activity.html#enterPictureInPictureMode()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#enterPictureInPictureMode(android.app.PictureInPictureParams)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/PictureInPictureParams.html params)` `@https://developer.android.com/reference/androidx/annotation/NonNull T` `<T extends https://developer.android.com/reference/android/view/View.html> https://developer.android.com/reference/android/app/Activity.html#findViewById(int)(int id)` `void` `https://developer.android.com/reference/android/app/Activity.html#finish()()` `void` `https://developer.android.com/reference/android/app/Activity.html#finishActivity(int)(int requestCode)` `void` `https://developer.android.com/reference/android/app/Activity.html#finishActivityFromChild(android.app.Activity, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html child, int requestCode)` `void` `https://developer.android.com/reference/android/app/Activity.html#finishAffinity()()` `void` `https://developer.android.com/reference/android/app/Activity.html#finishAfterTransition()()` `void` `https://developer.android.com/reference/android/app/Activity.html#finishAndRemoveTask()()` `void` `https://developer.android.com/reference/android/app/Activity.html#finishFromChild(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html child)` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/app/ActionBar.html` `https://developer.android.com/reference/android/app/Activity.html#getActionBar()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Application.html` `https://developer.android.com/reference/android/app/Activity.html#getApplication()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/app/ComponentCaller.html` `https://developer.android.com/reference/android/app/Activity.html#getCaller()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/content/ComponentName.html` `https://developer.android.com/reference/android/app/Activity.html#getCallingActivity()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/app/Activity.html#getCallingPackage()()` `int` `https://developer.android.com/reference/android/app/Activity.html#getChangingConfigurations()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html` `https://developer.android.com/reference/android/app/Activity.html#getComponentName()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/transition/Scene.html` `https://developer.android.com/reference/android/app/Activity.html#getContentScene()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/transition/TransitionManager.html` `https://developer.android.com/reference/android/app/Activity.html#getContentTransitionManager()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/ComponentCaller.html` `https://developer.android.com/reference/android/app/Activity.html#getCurrentCaller()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/View.html` `https://developer.android.com/reference/android/app/Activity.html#getCurrentFocus()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/FragmentManager.html` `[getFragmentManager](https://developer.android.com/reference/android/app/Activity.html#getFragmentManager())()`

**This method is deprecated.** Deprecated in Java
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/ComponentCaller.html` `https://developer.android.com/reference/android/app/Activity.html#getInitialCaller()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html` `https://developer.android.com/reference/android/app/Activity.html#getIntent()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html` `https://developer.android.com/reference/android/app/Activity.html#getLastNonConfigurationInstance()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/app/Activity.html#getLaunchedFromPackage()()` `int` `https://developer.android.com/reference/android/app/Activity.html#getLaunchedFromUid()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/LayoutInflater.html` `https://developer.android.com/reference/android/app/Activity.html#getLayoutInflater()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/LoaderManager.html` `[getLoaderManager](https://developer.android.com/reference/android/app/Activity.html#getLoaderManager())()`

**This method is deprecated.** Deprecated in Java
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/app/Activity.html#getLocalClassName()()` `int` `https://developer.android.com/reference/android/app/Activity.html#getMaxNumPictureInPictureActions()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/media/session/MediaController.html` `https://developer.android.com/reference/android/app/Activity.html#getMediaController()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MenuInflater.html` `https://developer.android.com/reference/android/app/Activity.html#getMenuInflater()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/window/OnBackInvokedDispatcher.html` `https://developer.android.com/reference/android/app/Activity.html#getOnBackInvokedDispatcher()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html` `[getParent](https://developer.android.com/reference/android/app/Activity.html#getParent())()`

**This method is deprecated.** Deprecated in Java
`@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/content/Intent.html` `https://developer.android.com/reference/android/app/Activity.html#getParentActivityIntent()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/SharedPreferences.html` `https://developer.android.com/reference/android/app/Activity.html#getPreferences(int)(int mode)` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/net/Uri.html` `https://developer.android.com/reference/android/app/Activity.html#getReferrer()()` `int` `https://developer.android.com/reference/android/app/Activity.html#getRequestedOrientation()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/SearchEvent.html` `https://developer.android.com/reference/android/app/Activity.html#getSearchEvent()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/window/SplashScreen.html` `https://developer.android.com/reference/android/app/Activity.html#getSplashScreen()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html` `https://developer.android.com/reference/android/app/Activity.html#getSystemService(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `int` `https://developer.android.com/reference/android/app/Activity.html#getTaskId()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html` `https://developer.android.com/reference/android/app/Activity.html#getTitle()()` `final int` `https://developer.android.com/reference/android/app/Activity.html#getTitleColor()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/VoiceInteractor.html` `https://developer.android.com/reference/android/app/Activity.html#getVoiceInteractor()()` `final int` `https://developer.android.com/reference/android/app/Activity.html#getVolumeControlStream()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Window.html` `https://developer.android.com/reference/android/app/Activity.html#getWindow()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/WindowManager.html` `https://developer.android.com/reference/android/app/Activity.html#getWindowManager()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#hasWindowFocus()()` `void` `https://developer.android.com/reference/android/app/Activity.html#invalidateOptionsMenu()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isActivityTransitionRunning()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isChangingConfigurations()()` `final boolean` `[isChild](https://developer.android.com/reference/android/app/Activity.html#isChild())()`

**This method is deprecated.** Deprecated in Java
`boolean` `https://developer.android.com/reference/android/app/Activity.html#isDestroyed()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isFinishing()()` `final boolean` `https://developer.android.com/reference/android/app/Activity.html#isHandoffEnabled()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isImmersive()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isInMultiWindowMode()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isInPictureInPictureMode()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isLaunchedFromBubble()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isLocalVoiceInteractionSupported()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isTaskRoot()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isVoiceInteraction()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#isVoiceInteractionRoot()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/Cursor.html` `https://developer.android.com/reference/android/app/Activity.html#managedQuery(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,
@https://developer.android.com/reference/androidx/annotation/NonNull String[] projection,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html selection,
@https://developer.android.com/reference/androidx/annotation/NonNull String[] selectionArgs,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html sortOrder
)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#moveTaskToBack(boolean)(boolean nonRoot)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#navigateUpTo(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html upIntent)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#navigateUpToFromChild(android.app.Activity, android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html child, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html upIntent)` `void` `https://developer.android.com/reference/android/app/Activity.html#onActionModeFinished(android.view.ActionMode)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/ActionMode.html mode)` `void` `https://developer.android.com/reference/android/app/Activity.html#onActionModeStarted(android.view.ActionMode)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/ActionMode.html mode)` `void` `https://developer.android.com/reference/android/app/Activity.html#onActivityReenter(int, android.content.Intent)(int resultCode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html data)` `void` `https://developer.android.com/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent, android.app.ComponentCaller)(
int requestCode,
int resultCode,
https://developer.android.com/reference/android/content/Intent.html data,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/ComponentCaller.html caller
)` `void` `https://developer.android.com/reference/android/app/Activity.html#onApplyThemeResource(android.content.res.Resources.Theme, int, boolean)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.Theme.html theme,
int resid,
boolean first
)` `void` `https://developer.android.com/reference/android/app/Activity.html#onAttachFragment(android.app.Fragment)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Fragment.html fragment)` `void` `https://developer.android.com/reference/android/app/Activity.html#onAttachedToWindow()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onChildTitleChanged(android.app.Activity, java.lang.CharSequence)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html childActivity,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html title
)` `void` `https://developer.android.com/reference/android/app/Activity.html#onContentChanged()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onContextItemSelected(android.view.MenuItem)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MenuItem.html item)` `void` `https://developer.android.com/reference/android/app/Activity.html#onContextMenuClosed(android.view.Menu)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Menu.html menu)` `void` `https://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle, android.os.PersistableBundle)(https://developer.android.com/reference/android/os/Bundle.html savedInstanceState, https://developer.android.com/reference/android/os/PersistableBundle.html persistentState)` `void` `https://developer.android.com/reference/android/app/Activity.html#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/ContextMenu.html menu,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/View.html v,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html menuInfo
)` `https://developer.android.com/reference/java/lang/CharSequence.html` `https://developer.android.com/reference/android/app/Activity.html#onCreateDescription()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Dialog.html` `https://developer.android.com/reference/android/app/Activity.html#onCreateDialog(int)(int id)` `https://developer.android.com/reference/android/app/Dialog.html` `https://developer.android.com/reference/android/app/Activity.html#onCreateDialog(int, android.os.Bundle)(int id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html args)` `void` `https://developer.android.com/reference/android/app/Activity.html#onCreateNavigateUpTaskStack(android.app.TaskStackBuilder)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/TaskStackBuilder.html builder)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onCreateOptionsMenu(android.view.Menu)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Menu.html menu)` `https://developer.android.com/reference/android/view/View.html` `https://developer.android.com/reference/android/app/Activity.html#onCreatePanelView(int)(int featureId)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onCreateThumbnail(android.graphics.Bitmap, android.graphics.Canvas)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Bitmap.html outBitmap, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Canvas.html canvas)` `https://developer.android.com/reference/android/view/View.html` `https://developer.android.com/reference/android/app/Activity.html#onCreateView(java.lang.String, android.content.Context, android.util.AttributeSet)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/AttributeSet.html attrs
)` `https://developer.android.com/reference/android/view/View.html` `https://developer.android.com/reference/android/app/Activity.html#onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet)(
https://developer.android.com/reference/android/view/View.html parent,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/AttributeSet.html attrs
)` `void` `https://developer.android.com/reference/android/app/Activity.html#onDestroy()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onDetachedFromWindow()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onEnterAnimationComplete()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onGenericMotionEvent(android.view.MotionEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MotionEvent.html event)` `void` `https://developer.android.com/reference/android/app/Activity.html#onGetDirectActions(android.os.CancellationSignal, java.util.function.Consumer&lt;java.util.List&lt;android.app.DirectAction&gt;&gt;)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/CancellationSignal.html cancellationSignal,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/function/Consumer.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/DirectAction.html>> callback
)` `https://developer.android.com/reference/android/app/HandoffActivityData.html` `https://developer.android.com/reference/android/app/Activity.html#onHandoffActivityDataRequested(android.app.HandoffActivityDataRequestInfo)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/HandoffActivityDataRequestInfo.html requestInfo
)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onKeyDown(int, android.view.KeyEvent)(int keyCode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/KeyEvent.html event)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onKeyLongPress(int, android.view.KeyEvent)(int keyCode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/KeyEvent.html event)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onKeyMultiple(int, int, android.view.KeyEvent)(int keyCode, int repeatCount, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/KeyEvent.html event)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onKeyShortcut(int, android.view.KeyEvent)(int keyCode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/KeyEvent.html event)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onKeyUp(int, android.view.KeyEvent)(int keyCode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/KeyEvent.html event)` `void` `https://developer.android.com/reference/android/app/Activity.html#onLocalVoiceInteractionStarted()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onLocalVoiceInteractionStopped()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onLowMemory()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onMenuOpened(int, android.view.Menu)(int featureId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Menu.html menu)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onNavigateUp()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onNavigateUpFromChild(android.app.Activity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html child)` `void` `https://developer.android.com/reference/android/app/Activity.html#onNewIntent(android.content.Intent, android.app.ComponentCaller)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/ComponentCaller.html caller)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onOptionsItemSelected(android.view.MenuItem)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MenuItem.html item)` `void` `https://developer.android.com/reference/android/app/Activity.html#onOptionsMenuClosed(android.view.Menu)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Menu.html menu)` `void` `https://developer.android.com/reference/android/app/Activity.html#onPause()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onPerformDirectAction(java.lang.String, android.os.Bundle, android.os.CancellationSignal, java.util.function.Consumer&lt;android.os.Bundle&gt;)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html actionId,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html arguments,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/CancellationSignal.html cancellationSignal,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/function/Consumer.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html> resultListener
)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onPictureInPictureRequested()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onPostCreate(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)` `void` `https://developer.android.com/reference/android/app/Activity.html#onPostCreate(android.os.Bundle, android.os.PersistableBundle)(
https://developer.android.com/reference/android/os/Bundle.html savedInstanceState,
https://developer.android.com/reference/android/os/PersistableBundle.html persistentState
)` `void` `https://developer.android.com/reference/android/app/Activity.html#onPostResume()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onPrepareDialog(int, android.app.Dialog)(int id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Dialog.html dialog)` `void` `https://developer.android.com/reference/android/app/Activity.html#onPrepareDialog(int, android.app.Dialog, android.os.Bundle)(int id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Dialog.html dialog, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html args)` `void` `https://developer.android.com/reference/android/app/Activity.html#onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/TaskStackBuilder.html builder)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onPrepareOptionsMenu(android.view.Menu)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Menu.html menu)` `void` `https://developer.android.com/reference/android/app/Activity.html#onProvideAssistContent(android.app.assist.AssistContent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/assist/AssistContent.html outContent)` `void` `https://developer.android.com/reference/android/app/Activity.html#onProvideAssistData(android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html data)` `void` `https://developer.android.com/reference/android/app/Activity.html#onProvideKeyboardShortcuts(java.util.List&lt;android.view.KeyboardShortcutGroup&gt;, android.view.Menu, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/KeyboardShortcutGroup.html> data,
https://developer.android.com/reference/android/view/Menu.html menu,
int deviceId
)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html` `https://developer.android.com/reference/android/app/Activity.html#onProvideReferrer()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onRequestPermissionsResult(int, java.lang.String[], int[], int)(
int requestCode,
@https://developer.android.com/reference/androidx/annotation/NonNull String[] permissions,
@https://developer.android.com/reference/androidx/annotation/NonNull int[] grantResults,
int deviceId
)` `void` `https://developer.android.com/reference/android/app/Activity.html#onRestart()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)` `void` `https://developer.android.com/reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle, android.os.PersistableBundle)(
https://developer.android.com/reference/android/os/Bundle.html savedInstanceState,
https://developer.android.com/reference/android/os/PersistableBundle.html persistentState
)` `void` `https://developer.android.com/reference/android/app/Activity.html#onResume()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html outState,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/PersistableBundle.html outPersistentState
)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onSearchRequested()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onSearchRequested(android.view.SearchEvent)(https://developer.android.com/reference/android/view/SearchEvent.html searchEvent)` `void` `https://developer.android.com/reference/android/app/Activity.html#onStart()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onStateNotSaved()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onStop()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onTitleChanged(java.lang.CharSequence, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html title, int color)` `void` `https://developer.android.com/reference/android/app/Activity.html#onTopResumedActivityChanged(boolean)(boolean isTopResumedActivity)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onTouchEvent(android.view.MotionEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MotionEvent.html event)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#onTrackballEvent(android.view.MotionEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MotionEvent.html event)` `void` `https://developer.android.com/reference/android/app/Activity.html#onUserInteraction()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onVisibleBehindCanceled()()` `void` `https://developer.android.com/reference/android/app/Activity.html#onWindowAttributesChanged(android.view.WindowManager.LayoutParams)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html params)` `void` `https://developer.android.com/reference/android/app/Activity.html#onWindowFocusChanged(boolean)(boolean hasFocus)` `https://developer.android.com/reference/android/view/ActionMode.html` `https://developer.android.com/reference/android/app/Activity.html#onWindowStartingActionMode(android.view.ActionMode.Callback)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/ActionMode.Callback.html callback)` `https://developer.android.com/reference/android/view/ActionMode.html` `https://developer.android.com/reference/android/app/Activity.html#onWindowStartingActionMode(android.view.ActionMode.Callback, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/ActionMode.Callback.html callback,
int type
)` `void` `https://developer.android.com/reference/android/app/Activity.html#openContextMenu(android.view.View)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/View.html view)` `void` `https://developer.android.com/reference/android/app/Activity.html#openOptionsMenu()()` `void` `https://developer.android.com/reference/android/app/Activity.html#overrideActivityTransition(int, int, int)(
int overrideType,
int enterAnim,
int exitAnim
)` `void` `https://developer.android.com/reference/android/app/Activity.html#overrideActivityTransition(int, int, int, int)(
int overrideType,
int enterAnim,
int exitAnim,
int backgroundColor
)` `void` `https://developer.android.com/reference/android/app/Activity.html#overridePendingTransition(int, int)(int enterAnim, int exitAnim)` `void` `https://developer.android.com/reference/android/app/Activity.html#overridePendingTransition(int, int, int)(
int enterAnim,
int exitAnim,
int backgroundColor
)` `void` `https://developer.android.com/reference/android/app/Activity.html#postponeEnterTransition()()` `void` `https://developer.android.com/reference/android/app/Activity.html#recreate()()` `void` `https://developer.android.com/reference/android/app/Activity.html#registerActivityLifecycleCallbacks(android.app.Application.ActivityLifecycleCallbacks)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html callback
)` `void` `https://developer.android.com/reference/android/app/Activity.html#registerComponentCallbacks(android.content.ComponentCallbacks)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentCallbacks.html callback)` `void` `https://developer.android.com/reference/android/app/Activity.html#registerForContextMenu(android.view.View)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/View.html view)` `void` `https://developer.android.com/reference/android/app/Activity.html#registerScreenCaptureCallback(java.util.concurrent.Executor, android.app.Activity.ScreenCaptureCallback)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.ScreenCaptureCallback.html callback
)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#releaseInstance()()` `final void` `https://developer.android.com/reference/android/app/Activity.html#removeDialog(int)(int id)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/DragAndDropPermissions.html` `https://developer.android.com/reference/android/app/Activity.html#requestDragAndDropPermissions(android.view.DragEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/DragEvent.html event)` `void` `https://developer.android.com/reference/android/app/Activity.html#requestFullscreenMode(int, android.os.OutcomeReceiver&lt;java.lang.Void,java.lang.Throwable&gt;)(
int request,
https://developer.android.com/reference/android/os/OutcomeReceiver.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Void.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html> approvalCallback
)` `final void` `https://developer.android.com/reference/android/app/Activity.html#requestOpenInBrowserEducation()()` `final void` `https://developer.android.com/reference/android/app/Activity.html#requestPermissions(java.lang.String[], int)(@https://developer.android.com/reference/androidx/annotation/NonNull String[] permissions, int requestCode)` `final void` `https://developer.android.com/reference/android/app/Activity.html#requestPermissions(java.lang.String[], int, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull String[] permissions,
int requestCode,
int deviceId
)` `final void` `https://developer.android.com/reference/android/app/Activity.html#requestShowKeyboardShortcuts()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#requestVisibleBehind(boolean)(boolean visible)` `final boolean` `https://developer.android.com/reference/android/app/Activity.html#requestWindowFeature(int)(int featureId)` `final @https://developer.android.com/reference/androidx/annotation/NonNull T` `<T extends https://developer.android.com/reference/android/view/View.html> https://developer.android.com/reference/android/app/Activity.html#requireViewById(int)(int id)` `final void` `https://developer.android.com/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Runnable.html action)` `void` `https://developer.android.com/reference/android/app/Activity.html#setActionBar(android.widget.Toolbar)(https://developer.android.com/reference/android/widget/Toolbar.html toolbar)` `void` `https://developer.android.com/reference/android/app/Activity.html#setAllowCrossUidActivitySwitchFromBelow(boolean)(boolean allowed)` `void` `https://developer.android.com/reference/android/app/Activity.html#setContentTransitionManager(android.transition.TransitionManager)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/transition/TransitionManager.html tm)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setDefaultKeyMode(int)(int mode)` `void` `https://developer.android.com/reference/android/app/Activity.html#setEnterSharedElementCallback(android.app.SharedElementCallback)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/SharedElementCallback.html callback)` `void` `https://developer.android.com/reference/android/app/Activity.html#setExitSharedElementCallback(android.app.SharedElementCallback)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/SharedElementCallback.html callback)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setFeatureDrawable(int, android.graphics.drawable.Drawable)(int featureId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableAlpha(int, int)(int featureId, int alpha)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableResource(int, int)(int featureId, int resId)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableUri(int, android.net.Uri)(int featureId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri)` `void` `https://developer.android.com/reference/android/app/Activity.html#setFinishOnTouchOutside(boolean)(boolean finish)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setHandoffEnabled(boolean, android.app.HandoffActivityParams)(
boolean handoffEnabled,
https://developer.android.com/reference/android/app/HandoffActivityParams.html handoffActivityParams
)` `void` `https://developer.android.com/reference/android/app/Activity.html#setImmersive(boolean)(boolean i)` `void` `https://developer.android.com/reference/android/app/Activity.html#setInheritShowWhenLocked(boolean)(boolean inheritShowWhenLocked)` `void` `https://developer.android.com/reference/android/app/Activity.html#setIntent(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html newIntent)` `void` `https://developer.android.com/reference/android/app/Activity.html#setIntent(android.content.Intent, android.app.ComponentCaller)(https://developer.android.com/reference/android/content/Intent.html newIntent, https://developer.android.com/reference/android/app/ComponentCaller.html newCaller)` `void` `https://developer.android.com/reference/android/app/Activity.html#setLocusContext(android.content.LocusId, android.os.Bundle)(https://developer.android.com/reference/android/content/LocusId.html locusId, https://developer.android.com/reference/android/os/Bundle.html bundle)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setMediaController(android.media.session.MediaController)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/media/session/MediaController.html controller)` `void` `https://developer.android.com/reference/android/app/Activity.html#setPictureInPictureParams(android.app.PictureInPictureParams)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/PictureInPictureParams.html params)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setProgress(int)(int progress)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setProgressBarIndeterminate(boolean)(boolean indeterminate)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setProgressBarIndeterminateVisibility(boolean)(boolean visible)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setProgressBarVisibility(boolean)(boolean visible)` `void` `https://developer.android.com/reference/android/app/Activity.html#setRecentsScreenshotEnabled(boolean)(boolean enabled)` `void` `https://developer.android.com/reference/android/app/Activity.html#setRequestedOrientation(int)(int requestedOrientation)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setResult(int)(int resultCode)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setResult(int, android.content.Intent)(int resultCode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html data)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setSecondaryProgress(int)(int secondaryProgress)` `void` `https://developer.android.com/reference/android/app/Activity.html#setShouldDockBigOverlays(boolean)(boolean shouldDockBigOverlays)` `void` `https://developer.android.com/reference/android/app/Activity.html#setShowWhenLocked(boolean)(boolean showWhenLocked)` `void` `https://developer.android.com/reference/android/app/Activity.html#setTaskDescription(android.app.ActivityManager.TaskDescription)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/ActivityManager.TaskDescription.html taskDescription
)` `void` `https://developer.android.com/reference/android/app/Activity.html#setTheme(int)(int resid)` `void` `https://developer.android.com/reference/android/app/Activity.html#setTitle(java.lang.CharSequence)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html title)` `void` `https://developer.android.com/reference/android/app/Activity.html#setTitle(int)(int titleId)` `void` `[setTitleColor](https://developer.android.com/reference/android/app/Activity.html#setTitleColor(int))(int textColor)`

**This method is deprecated.** Deprecated in Java
`boolean` `https://developer.android.com/reference/android/app/Activity.html#setTranslucent(boolean)(boolean translucent)` `void` `https://developer.android.com/reference/android/app/Activity.html#setTurnScreenOn(boolean)(boolean turnScreenOn)` `void` `https://developer.android.com/reference/android/app/Activity.html#setVisible(boolean)(boolean visible)` `final void` `https://developer.android.com/reference/android/app/Activity.html#setVolumeControlStream(int)(int streamType)` `void` `https://developer.android.com/reference/android/app/Activity.html#setVrModeEnabled(boolean, android.content.ComponentName)(
boolean enabled,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html requestedComponent
)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#shouldDockBigOverlays()()` `boolean` `https://developer.android.com/reference/android/app/Activity.html#shouldShowRequestPermissionRationale(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#shouldShowRequestPermissionRationale(java.lang.String, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission,
int deviceId
)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#shouldUpRecreateTask(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html targetIntent)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#showAssist(android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html args)` `final void` `https://developer.android.com/reference/android/app/Activity.html#showDialog(int)(int id)` `final boolean` `https://developer.android.com/reference/android/app/Activity.html#showDialog(int, android.os.Bundle)(int id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html args)` `void` `https://developer.android.com/reference/android/app/Activity.html#showLockTaskEscapeMessage()()` `https://developer.android.com/reference/android/view/ActionMode.html` `https://developer.android.com/reference/android/app/Activity.html#startActionMode(android.view.ActionMode.Callback)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/ActionMode.Callback.html callback)` `https://developer.android.com/reference/android/view/ActionMode.html` `https://developer.android.com/reference/android/app/Activity.html#startActionMode(android.view.ActionMode.Callback, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/ActionMode.Callback.html callback, int type)` `void` `https://developer.android.com/reference/android/app/Activity.html#startActivities(android.content.Intent[])(@https://developer.android.com/reference/androidx/annotation/NonNull Intent[] intents)` `void` `https://developer.android.com/reference/android/app/Activity.html#startActivities(android.content.Intent[], android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull Intent[] intents, https://developer.android.com/reference/android/os/Bundle.html options)` `void` `https://developer.android.com/reference/android/app/Activity.html#startActivity(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `void` `https://developer.android.com/reference/android/app/Activity.html#startActivity(android.content.Intent, android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/Bundle.html options)` `void` `https://developer.android.com/reference/android/app/Activity.html#startActivityFromChild(android.app.Activity, android.content.Intent, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html child,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
int requestCode
)` `void` `https://developer.android.com/reference/android/app/Activity.html#startActivityFromChild(android.app.Activity, android.content.Intent, int, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html child,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
int requestCode,
https://developer.android.com/reference/android/os/Bundle.html options
)` `void` `https://developer.android.com/reference/android/app/Activity.html#startActivityFromFragment(android.app.Fragment, android.content.Intent, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Fragment.html fragment,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
int requestCode
)` `void` `https://developer.android.com/reference/android/app/Activity.html#startActivityFromFragment(android.app.Fragment, android.content.Intent, int, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Fragment.html fragment,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
int requestCode,
https://developer.android.com/reference/android/os/Bundle.html options
)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#startActivityIfNeeded(android.content.Intent, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, int requestCode)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#startActivityIfNeeded(android.content.Intent, int, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
int requestCode,
https://developer.android.com/reference/android/os/Bundle.html options
)` `void` `https://developer.android.com/reference/android/app/Activity.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentSender.html intent,
https://developer.android.com/reference/android/content/Intent.html fillInIntent,
int flagsMask,
int flagsValues,
int extraFlags
)` `void` `https://developer.android.com/reference/android/app/Activity.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentSender.html intent,
https://developer.android.com/reference/android/content/Intent.html fillInIntent,
int flagsMask,
int flagsValues,
int extraFlags,
https://developer.android.com/reference/android/os/Bundle.html options
)` `void` `https://developer.android.com/reference/android/app/Activity.html#startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html child,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentSender.html intent,
int requestCode,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html fillInIntent,
int flagsMask,
int flagsValues,
int extraFlags
)` `void` `https://developer.android.com/reference/android/app/Activity.html#startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html child,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentSender.html intent,
int requestCode,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html fillInIntent,
int flagsMask,
int flagsValues,
int extraFlags,
https://developer.android.com/reference/android/os/Bundle.html options
)` `void` `https://developer.android.com/reference/android/app/Activity.html#startLocalVoiceInteraction(android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html privateOptions)` `void` `https://developer.android.com/reference/android/app/Activity.html#startLockTask()()` `void` `https://developer.android.com/reference/android/app/Activity.html#startManagingCursor(android.database.Cursor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/Cursor.html c)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#startNextMatchingActivity(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `boolean` `https://developer.android.com/reference/android/app/Activity.html#startNextMatchingActivity(android.content.Intent, android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/Bundle.html options)` `void` `https://developer.android.com/reference/android/app/Activity.html#startPostponedEnterTransition()()` `void` `https://developer.android.com/reference/android/app/Activity.html#startSearch(java.lang.String, boolean, android.os.Bundle, boolean)(
https://developer.android.com/reference/java/lang/String.html initialQuery,
boolean selectInitialQuery,
https://developer.android.com/reference/android/os/Bundle.html appSearchData,
boolean globalSearch
)` `void` `https://developer.android.com/reference/android/app/Activity.html#stopLocalVoiceInteraction()()` `void` `https://developer.android.com/reference/android/app/Activity.html#stopLockTask()()` `void` `https://developer.android.com/reference/android/app/Activity.html#stopManagingCursor(android.database.Cursor)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/Cursor.html c)` `void` `https://developer.android.com/reference/android/app/Activity.html#takeKeyEvents(boolean)(boolean get)` `void` `https://developer.android.com/reference/android/app/Activity.html#triggerSearch(java.lang.String, android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html query, https://developer.android.com/reference/android/os/Bundle.html appSearchData)` `void` `https://developer.android.com/reference/android/app/Activity.html#unregisterActivityLifecycleCallbacks(android.app.Application.ActivityLifecycleCallbacks)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html callback
)` `void` `https://developer.android.com/reference/android/app/Activity.html#unregisterComponentCallbacks(android.content.ComponentCallbacks)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentCallbacks.html callback)` `void` `https://developer.android.com/reference/android/app/Activity.html#unregisterForContextMenu(android.view.View)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/View.html view)` `void` `https://developer.android.com/reference/android/app/Activity.html#unregisterScreenCaptureCallback(android.app.Activity.ScreenCaptureCallback)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.ScreenCaptureCallback.html callback
)` From [android.content.Context](https://developer.android.com/reference/android/content/Context.html) `boolean` `https://developer.android.com/reference/android/content/Context.html#bindIsolatedService(android.content.Intent, android.content.Context.BindServiceFlags, java.lang.String, java.util.concurrent.Executor, android.content.ServiceConnection)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html instanceName,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn
)` `final int` `https://developer.android.com/reference/android/content/Context.html#getColor(int)(int id)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/ColorStateList.html` `https://developer.android.com/reference/android/content/Context.html#getColorStateList(int)(int id)` `final https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `https://developer.android.com/reference/android/content/Context.html#getDrawable(int)(int id)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#getString(int)(int resId)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#getString(int, java.lang.Object...)(int resId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html... formatArgs)` `final @https://developer.android.com/reference/androidx/annotation/NonNull T` `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/android/content/Context.html#getSystemService(java.lang.Class&lt;T&gt;)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> serviceClass)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html` `https://developer.android.com/reference/android/content/Context.html#getText(int)(int resId)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html` `https://developer.android.com/reference/android/content/Context.html#getUpdateableFlags()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(int[])(@https://developer.android.com/reference/androidx/annotation/NonNull int[] attrs)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(int, int[])(int resid, @https://developer.android.com/reference/androidx/annotation/NonNull int[] attrs)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(android.util.AttributeSet, int[])(https://developer.android.com/reference/android/util/AttributeSet.html set, @https://developer.android.com/reference/androidx/annotation/NonNull int[] attrs)` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/TypedArray.html` `https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(android.util.AttributeSet, int[], int, int)(
https://developer.android.com/reference/android/util/AttributeSet.html set,
@https://developer.android.com/reference/androidx/annotation/NonNull int[] attrs,
int defStyleAttr,
int defStyleRes
)` `void` `https://developer.android.com/reference/android/content/Context.html#revokeSelfPermissionOnKill(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permName)` `void` `https://developer.android.com/reference/android/content/Context.html#sendBroadcastWithMultiplePermissions(android.content.Intent, java.lang.String[])(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
@https://developer.android.com/reference/androidx/annotation/NonNull String[] receiverPermissions
)` From [android.view.ContextThemeWrapper](https://developer.android.com/reference/android/view/ContextThemeWrapper.html) `void` `https://developer.android.com/reference/android/view/ContextThemeWrapper.html#applyOverrideConfiguration(android.content.res.Configuration)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html overrideConfiguration)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/AssetManager.html` `https://developer.android.com/reference/android/view/ContextThemeWrapper.html#getAssets()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html` `https://developer.android.com/reference/android/view/ContextThemeWrapper.html#getResources()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.Theme.html` `https://developer.android.com/reference/android/view/ContextThemeWrapper.html#getTheme()()` `void` `https://developer.android.com/reference/android/view/ContextThemeWrapper.html#setTheme(android.content.res.Resources.Theme)(https://developer.android.com/reference/android/content/res/Resources.Theme.html theme)` From [android.content.ContextWrapper](https://developer.android.com/reference/android/content/ContextWrapper.html) `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindIsolatedService(android.content.Intent, int, java.lang.String, java.util.concurrent.Executor, android.content.ServiceConnection)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,
int flags,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html instanceName,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn
)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.ServiceConnection, android.content.Context.BindServiceFlags)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags
)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.ServiceConnection, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,
int flags
)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.Context.BindServiceFlags, java.util.concurrent.Executor, android.content.ServiceConnection)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn
)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, int, java.util.concurrent.Executor, android.content.ServiceConnection)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,
int flags,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn
)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindServiceAsUser(android.content.Intent, android.content.ServiceConnection, android.content.Context.BindServiceFlags, android.os.UserHandle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user
)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#bindServiceAsUser(android.content.Intent, android.content.ServiceConnection, int, android.os.UserHandle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,
int flags,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user
)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfPermission(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermission(android.net.Uri, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)` `@https://developer.android.com/reference/androidx/annotation/NonNull int[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermissions(java.util.List&lt;android.net.Uri&gt;, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html> uris,
int modeFlags
)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingPermission(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingUriPermission(android.net.Uri, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)` `@https://developer.android.com/reference/androidx/annotation/NonNull int[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingUriPermissions(java.util.List&lt;android.net.Uri&gt;, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html> uris, int modeFlags)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkContentUriPermissionFull(android.net.Uri, int, int, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,
int pid,
int uid,
int modeFlags
)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkPermission(java.lang.String, int, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission, int pid, int uid)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkSelfPermission(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermission(android.net.Uri, int, int, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, int pid, int uid, int modeFlags)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int)(
https://developer.android.com/reference/android/net/Uri.html uri,
https://developer.android.com/reference/java/lang/String.html readPermission,
https://developer.android.com/reference/java/lang/String.html writePermission,
int pid,
int uid,
int modeFlags
)` `@https://developer.android.com/reference/androidx/annotation/NonNull int[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermissions(java.util.List&lt;android.net.Uri&gt;, int, int, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html> uris,
int pid,
int uid,
int modeFlags
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#clearWallpaper()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createAttributionContext(java.lang.String)(https://developer.android.com/reference/java/lang/String.html attributionTag)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createConfigurationContext(android.content.res.Configuration)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html overrideConfiguration)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createContext(android.content.ContextParams)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ContextParams.html contextParams)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createContextForSplit(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html splitName)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createDeviceContext(int)(int deviceId)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createDeviceProtectedStorageContext()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createDisplayContext(android.view.Display)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Display.html display)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createPackageContext(java.lang.String, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html packageName, int flags)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createWindowContext(int, android.os.Bundle)(int type, https://developer.android.com/reference/android/os/Bundle.html options)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#createWindowContext(android.view.Display, int, android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Display.html display, int type, https://developer.android.com/reference/android/os/Bundle.html options)` `@https://developer.android.com/reference/androidx/annotation/NonNull String[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#databaseList()()` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#deleteDatabase(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#deleteFile(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#deleteSharedPreferences(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingOrSelfPermission(java.lang.String, java.lang.String)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission,
https://developer.android.com/reference/java/lang/String.html message
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingOrSelfUriPermission(android.net.Uri, int, java.lang.String)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,
int modeFlags,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingPermission(java.lang.String, java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission, https://developer.android.com/reference/java/lang/String.html message)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingUriPermission(android.net.Uri, int, java.lang.String)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,
int modeFlags,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforcePermission(java.lang.String, int, int, java.lang.String)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html permission,
int pid,
int uid,
https://developer.android.com/reference/java/lang/String.html message
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceUriPermission(android.net.Uri, int, int, int, java.lang.String)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,
int pid,
int uid,
int modeFlags,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#enforceUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int, java.lang.String)(
https://developer.android.com/reference/android/net/Uri.html uri,
https://developer.android.com/reference/java/lang/String.html readPermission,
https://developer.android.com/reference/java/lang/String.html writePermission,
int pid,
int uid,
int modeFlags,
https://developer.android.com/reference/java/lang/String.html message
)` `@https://developer.android.com/reference/androidx/annotation/NonNull String[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#fileList()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getApplicationContext()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/pm/ApplicationInfo.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getApplicationInfo()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/AttributionSource.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getAttributionSource()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getAttributionTag()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getBaseContext()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getCacheDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/ClassLoader.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getClassLoader()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getCodeCacheDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ContentResolver.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getContentResolver()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDataDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDatabasePath(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `int` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDeviceId()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDir(java.lang.String, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name, int mode)` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/Display.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getDisplay()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalCacheDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull File[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalCacheDirs()()` `https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalFilesDir(java.lang.String)(https://developer.android.com/reference/java/lang/String.html type)` `@https://developer.android.com/reference/androidx/annotation/NonNull File[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalFilesDirs(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html type)` `@https://developer.android.com/reference/androidx/annotation/NonNull File[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalMediaDirs()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getFileStreamPath(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getFilesDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getMainExecutor()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Looper.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getMainLooper()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getNoBackupFilesDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/File.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getObbDir()()` `@https://developer.android.com/reference/androidx/annotation/NonNull File[]` `https://developer.android.com/reference/android/content/ContextWrapper.html#getObbDirs()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getOpPackageName()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageCodePath()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/pm/PackageManager.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageManager()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageName()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageResourcePath()()` `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/content/ContextParams.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getParams()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/SharedPreferences.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getSharedPreferences(java.lang.String, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name, int mode)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#getSystemServiceName(java.lang.Class&lt;?&gt;)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?> serviceClass)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `[getWallpaper](https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaper())()`

**This method is deprecated.** Deprecated in Java
`int` `[getWallpaperDesiredMinimumHeight](https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaperDesiredMinimumHeight())()`

**This method is deprecated.** Deprecated in Java
`int` `[getWallpaperDesiredMinimumWidth](https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaperDesiredMinimumWidth())()`

**This method is deprecated.** Deprecated in Java
`void` `https://developer.android.com/reference/android/content/ContextWrapper.html#grantUriPermission(java.lang.String, android.net.Uri, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html toPackage,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,
int modeFlags
)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#isDeviceProtectedStorage()()` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#isRestricted()()` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#isUiContext()()` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#moveDatabaseFrom(android.content.Context, java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html sourceContext, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#moveSharedPreferencesFrom(android.content.Context, java.lang.String)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html sourceContext,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name
)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/FileInputStream.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#openFileInput(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/FileOutputStream.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#openFileOutput(java.lang.String, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name, int mode)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name,
int mode,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html factory
)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory, android.database.DatabaseErrorHandler)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name,
int mode,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html factory,
https://developer.android.com/reference/android/database/DatabaseErrorHandler.html errorHandler
)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#peekWallpaper()()` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#rebindService(android.content.ServiceConnection, android.content.Context.BindServiceFlags)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerDeviceIdChangeListener(java.util.concurrent.Executor, java.util.function.IntConsumer)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html executor,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/function/IntConsumer.html listener
)` `https://developer.android.com/reference/android/content/Intent.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)(
https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentFilter.html filter
)` `https://developer.android.com/reference/android/content/Intent.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, int)(
https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentFilter.html filter,
int flags
)` `https://developer.android.com/reference/android/content/Intent.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler)(
https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentFilter.html filter,
https://developer.android.com/reference/java/lang/String.html broadcastPermission,
https://developer.android.com/reference/android/os/Handler.html scheduler
)` `https://developer.android.com/reference/android/content/Intent.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler, int)(
https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/IntentFilter.html filter,
https://developer.android.com/reference/java/lang/String.html broadcastPermission,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int flags
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#removeStickyBroadcast(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#revokeSelfPermissionsOnKill(java.util.Collection&lt;java.lang.String&gt;)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> permissions
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#revokeUriPermission(android.net.Uri, int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#revokeUriPermission(java.lang.String, android.net.Uri, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html targetPackage,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri,
int modeFlags
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent, java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/java/lang/String.html receiverPermission)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent, java.lang.String, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/android/os/Bundle.html options
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user,
https://developer.android.com/reference/java/lang/String.html receiverPermission
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/java/lang/String.html receiverPermission)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/android/os/Bundle.html options
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.os.Bundle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/android/os/Bundle.html options,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/java/lang/String.html receiverAppOp,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, int, java.lang.String, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, java.lang.String, android.os.Bundle, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
int initialCode,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/java/lang/String.html receiverAppOp,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras,
https://developer.android.com/reference/android/os/Bundle.html options
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcast(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcast(android.content.Intent, android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/Bundle.html options)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html intent,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/UserHandle.html user,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#setWallpaper(android.graphics.Bitmap)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Bitmap.html bitmap)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#setWallpaper(java.io.InputStream)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/InputStream.html data)` `https://developer.android.com/reference/android/content/ComponentName.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startForegroundService(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html className,
https://developer.android.com/reference/java/lang/String.html profileFile,
https://developer.android.com/reference/android/os/Bundle.html arguments
)` `https://developer.android.com/reference/android/content/ComponentName.html` `https://developer.android.com/reference/android/content/ContextWrapper.html#startService(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html service)` `boolean` `https://developer.android.com/reference/android/content/ContextWrapper.html#stopService(android.content.Intent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html name)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#unbindService(android.content.ServiceConnection)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterDeviceIdChangeListener(java.util.function.IntConsumer)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/function/IntConsumer.html listener)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterReceiver(android.content.BroadcastReceiver)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#updateServiceBindings(java.util.Collection&lt;android.content.Context.UpdateBindingParams&gt;)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Collection.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.UpdateBindingParams.html> params
)` `void` `https://developer.android.com/reference/android/content/ContextWrapper.html#updateServiceGroup(android.content.ServiceConnection, int, int)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ServiceConnection.html conn,
int group,
int importance
)` From [android.view.Window.Callback](https://developer.android.com/reference/android/view/Window.Callback.html) `void` `https://developer.android.com/reference/android/view/Window.Callback.html#onPointerCaptureChanged(boolean)(boolean hasCapture)`

## Public constructors

### ComponentActivity

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

```
public ComponentActivity()
```

### ComponentActivity

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

```
@ContentView
public ComponentActivity(@LayoutRes int contentLayoutId)
```

Alternate constructor that can be used to provide a default layout that will be inflated as part of `super.onCreate(savedInstanceState)`.

This should generally be called from your constructor that takes no parameters, as is required for API 27 and lower or when using the default `https://developer.android.com/reference/android/app/AppComponentFactory.html`.

## Public methods

### addContentView

```
public void addContentView(View view, ViewGroup.LayoutParams params)
```

### addMenuProvider

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

```
public void addMenuProvider(@NonNull MenuProvider provider)
```

Adds the given `https://developer.android.com/reference/androidx/core/view/MenuProvider` to this `https://developer.android.com/reference/androidx/core/view/MenuHost`. If using this method, you must manually remove the provider when necessary.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/view/MenuProvider provider` | the MenuProvider to be added |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/view/MenuHost#removeMenuProvider(androidx.core.view.MenuProvider)` |   |

### addMenuProvider

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

```
public void addMenuProvider(
    @NonNull MenuProvider provider,
    @NonNull LifecycleOwner owner
)
```

Adds the given `https://developer.android.com/reference/androidx/core/view/MenuProvider` to this `https://developer.android.com/reference/androidx/core/view/MenuHost`. This `https://developer.android.com/reference/androidx/core/view/MenuProvider` will be removed once the given `https://developer.android.com/reference/androidx/lifecycle/LifecycleOwner` receives an Lifecycle.Event.ON_DESTROY event.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/view/MenuProvider provider` | the MenuProvider to be added |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/LifecycleOwner owner` | the Lifecycle owner whose state will determine the removal of the provider |

### addMenuProvider

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

```
public void addMenuProvider(
    @NonNull MenuProvider provider,
    @NonNull LifecycleOwner owner,
    @NonNull Lifecycle.State state
)
```

Adds the given `https://developer.android.com/reference/androidx/core/view/MenuProvider` to this `https://developer.android.com/reference/androidx/core/view/MenuHost` once the given `https://developer.android.com/reference/androidx/lifecycle/LifecycleOwner` reaches the given `https://developer.android.com/reference/androidx/lifecycle/Lifecycle.State`. This `https://developer.android.com/reference/androidx/core/view/MenuProvider` will be removed once the given `https://developer.android.com/reference/androidx/lifecycle/LifecycleOwner` goes down from the given `https://developer.android.com/reference/androidx/lifecycle/Lifecycle.State`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/view/MenuProvider provider` | the MenuProvider to be added |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/LifecycleOwner owner` | the Lifecycle owner whose state will be used for automated addition/removal |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/Lifecycle.State state` | the Lifecycle.State to check for automated addition/removal |

### addOnConfigurationChangedListener

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

```
public final void addOnConfigurationChangedListener(
    @NonNull Consumer<@NonNull Configuration> listener
)
```

Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/content/ComponentCallbacks.html#onConfigurationChanged(android.content.res.Configuration)` with the new `https://developer.android.com/reference/android/content/res/Configuration.html`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html> listener` | The listener that should be called whenever {`https://developer.android.com/reference/android/content/ComponentCallbacks.html#onConfigurationChanged(android.content.res.Configuration)` was called. |

### addOnContextAvailableListener

```
public final void addOnContextAvailableListener(
    @NonNull OnContextAvailableListener listener
)
```

{@inheritDoc}

Any listener added here will receive a callback as part of `super.onCreate()`, but importantly **before** any other logic is done (including calling through to the framework `https://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)`) with the exception of restoring the state of the `https://developer.android.com/reference/androidx/activity/ComponentActivity#savedStateRegistry()` for use in your listener.

### addOnMultiWindowModeChangedListener

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

```
public final void addOnMultiWindowModeChangedListener(
    @NonNull Consumer<@NonNull MultiWindowModeChangedInfo> listener
)
```

Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/app/Activity.html#onMultiWindowModeChanged(boolean)` with the new `https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo> listener` | The listener that should be called whenever Activity#onMultiWindowModeChanged was called. |

### addOnNewIntentListener

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

```
public final void addOnNewIntentListener(@NonNull Consumer<@NonNull Intent> listener)
```

Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/app/Activity.html#onNewIntent(android.content.Intent)` with the new `https://developer.android.com/reference/android/content/Intent.html`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html> listener` | The listener that should be called whenever android.app.Activity#onNewIntent was called. |

### addOnPictureInPictureModeChangedListener

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

```
public final void addOnPictureInPictureModeChangedListener(
    @NonNull Consumer<@NonNull PictureInPictureModeChangedInfo> listener
)
```

Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/app/Activity.html#onPictureInPictureModeChanged(boolean)` with the new `https://developer.android.com/reference/androidx/core/app/PictureInPictureModeChangedInfo`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureModeChangedInfo> listener` | The listener that should be called whenever `https://developer.android.com/reference/android/app/Activity.html#onPictureInPictureModeChanged(boolean)` was called. |

### addOnPictureInPictureUiStateChangedListener

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

```
public final void addOnPictureInPictureUiStateChangedListener(
    @NonNull Consumer<@NonNull PictureInPictureUiStateCompat> listener
)
```

Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/app/Activity.html#onPictureInPictureUiStateChanged(android.app.PictureInPictureUiState)` with the new `https://developer.android.com/reference/androidx/core/app/PictureInPictureUiStateCompat`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureUiStateCompat> listener` | The listener that should be called whenever `https://developer.android.com/reference/android/app/Activity.html#onPictureInPictureUiStateChanged(android.app.PictureInPictureUiState)` was called. |

### addOnTrimMemoryListener

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

```
public final void addOnTrimMemoryListener(@NonNull Consumer<@NonNull Integer> listener)
```

Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)` with the `int` representing the level of trimming.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> listener` | The listener that should be called whenever `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)` was called. |

### addOnUserLeaveHintListener

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

```
public final void addOnUserLeaveHintListener(@NonNull Runnable listener)
```

Add a new listener that will get a callback associated with `https://developer.android.com/reference/android/app/Activity.html#onUserLeaveHint()`

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Runnable.html listener` | The listener that should be called whenever `https://developer.android.com/reference/android/app/Activity.html#onUserLeaveHint()` was called. |

### enterPictureInPictureMode

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

```
public final void enterPictureInPictureMode(@NonNull PictureInPictureParamsCompat params)
```

Available since API 24 in the framework Activity class, puts the activity in picture-in-picture mode if possible in the current system state. Any prior calls to `https://developer.android.com/reference/androidx/core/app/PictureInPictureProvider#setPictureInPictureParams(androidx.core.app.PictureInPictureParamsCompat)` will still apply when entering picture-in-picture through this call.

### getActivityResultRegistry

```
public final @NonNull ActivityResultRegistry getActivityResultRegistry()
```

Get the `https://developer.android.com/reference/androidx/activity/result/ActivityResultRegistry` associated with this activity.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultRegistry` | the `https://developer.android.com/reference/androidx/activity/result/ActivityResultRegistry` |

### getDefaultViewModelArgs

Added in [1.14.0-alpha03](https://developer.android.com/jetpack/androidx/releases/activity#1.14.0-alpha03)

```
public Bundle getDefaultViewModelArgs()
```

The default arguments `https://developer.android.com/reference/android/os/Bundle.html` to pass to `https://developer.android.com/reference/androidx/lifecycle/package-summary#DEFAULT_ARGS_KEY()` in `https://developer.android.com/reference/androidx/activity/ComponentActivity#defaultViewModelCreationExtras()`.

For exported activities (activities that can be launched by external applications), this returns `null` by default to prevent untrusted intent extras from populating ViewModel saved state. For non-exported activities, this returns `intent?.extras`.

Override this property to explicitly pass or validate intent extras for ViewModels created by this Activity.

### getDefaultViewModelCreationExtras

```
@CallSuper
public @NonNull CreationExtras getDefaultViewModelCreationExtras()
```

{@inheritDoc}

The extras of `https://developer.android.com/reference/android/app/Activity.html#getIntent()` when this is first called will be used as the defaults to any `https://developer.android.com/reference/androidx/lifecycle/SavedStateHandle` passed to a view model created using this extra.

### getDefaultViewModelProviderFactory

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

```
public @NonNull ViewModelProvider.Factory getDefaultViewModelProviderFactory()
```

### getFullyDrawnReporter

```
public @NonNull FullyDrawnReporter getFullyDrawnReporter()
```

Retrieve the `https://developer.android.com/reference/androidx/activity/FullyDrawnReporter` that should handle the independent parts of the UI that separately report that they are fully drawn.

### getLastCustomNonConfigurationInstance

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

```
public Object [getLastCustomNonConfigurationInstance](https://developer.android.com/reference/androidx/activity/ComponentActivity#getLastCustomNonConfigurationInstance())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Use a {@link androidx.lifecycle.ViewModel} to store non config state.

Return the value previously returned from `https://developer.android.com/reference/androidx/activity/ComponentActivity#onRetainCustomNonConfigurationInstance()`.

### getLifecycle

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

```
public @NonNull Lifecycle getLifecycle()
```

{@inheritDoc}

Overriding this method is no longer supported and this method will be made `final` in a future version of ComponentActivity. If you do override this method, you *must*:

1. Return an instance of `https://developer.android.com/reference/androidx/lifecycle/LifecycleRegistry`

2. Lazily initialize your LifecycleRegistry object when this is first called.

Note that this method will be called in the super classes' constructor, before any field initialization or object state creation is complete.

### getNavigationEventDispatcher

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

```
public @NonNull NavigationEventDispatcher getNavigationEventDispatcher()
```

Lazily provides a `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` for back navigation handling, including support for predictive back gestures introduced in Android 13 (API 33+).

This dispatcher acts as the central point for back navigation events. When a navigation event occurs (e.g., a back gesture), it safely invokes `https://developer.android.com/reference/androidx/activity/ComponentActivity#onBackPressed()`.

### Not stable for override

**This property is not intended for override.** It is technically `open` for binary compatibility with previous versions, but overriding this property is unsupported.

### getOnBackPressedDispatcher

```
public final @NonNull OnBackPressedDispatcher getOnBackPressedDispatcher()
```

Retrieve the `https://developer.android.com/reference/androidx/activity/OnBackPressedDispatcher` that will be triggered when `https://developer.android.com/reference/androidx/activity/ComponentActivity#onBackPressed()` is called.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/OnBackPressedDispatcher` | The `https://developer.android.com/reference/androidx/activity/OnBackPressedDispatcher` associated with this ComponentActivity. |

### getSavedStateRegistry

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

```
public final @NonNull SavedStateRegistry getSavedStateRegistry()
```

### getViewModelStore

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

```
public @NonNull ViewModelStore getViewModelStore()
```

Returns the `https://developer.android.com/reference/androidx/lifecycle/ViewModelStore` associated with this activity

Overriding this method is no longer supported and this method will be made `final` in a future version of ComponentActivity.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/ViewModelStore` | a `https://developer.android.com/reference/androidx/lifecycle/ViewModelStore` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if called before the Activity is attached to the Application instance i.e., before onCreate() |

### initializeViewTreeOwners

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

```
@CallSuper
public void initializeViewTreeOwners()
```

Sets the view tree owners before setting the content view so that the inflation process and attach listeners will see them already present.

### invalidateMenu

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

```
public void invalidateMenu()
```

Invalidates the `https://developer.android.com/reference/android/view/Menu.html` to ensure that what is displayed matches the current internal state of the menu. This should be called whenever the state of the menu is changed, such as items being removed or disabled based on some user event.

### onBackPressed

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

```
@MainThread
@CallSuper
public void [onBackPressed](https://developer.android.com/reference/androidx/activity/ComponentActivity#onBackPressed())()
```

> [!CAUTION]
> **This method is deprecated.**   
> This method has been deprecated in favor of using the {@link OnBackPressedDispatcher} via {@link #getOnBackPressedDispatcher()}. The OnBackPressedDispatcher controls how back button events are dispatched to one or more {@link OnBackPressedCallback} objects.

Called when the activity has detected the user's press of the back key. The `https://developer.android.com/reference/androidx/activity/ComponentActivity#onBackPressedDispatcher()` will be given a chance to handle the back button before the default behavior of `https://developer.android.com/reference/android/app/Activity.html#onBackPressed()` is invoked.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/activity/ComponentActivity#onBackPressedDispatcher()` |   |

### onConfigurationChanged

```
@CallSuper
public void onConfigurationChanged(@NonNull Configuration newConfig)
```

{@inheritDoc}

Dispatches this call to all listeners added via `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnConfigurationChangedListener(androidx.core.util.Consumer)`.

### onCreatePanelMenu

```
public boolean onCreatePanelMenu(int featureId, @NonNull Menu menu)
```

### onMenuItemSelected

```
public boolean onMenuItemSelected(int featureId, @NonNull MenuItem item)
```

### onMultiWindowModeChanged

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

```
@CallSuper
public void [onMultiWindowModeChanged](https://developer.android.com/reference/androidx/activity/ComponentActivity#onMultiWindowModeChanged(kotlin.Boolean))(boolean isInMultiWindowMode)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in android.app.Activity

{@inheritDoc}

Dispatches this call to all listeners added via `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnMultiWindowModeChangedListener(androidx.core.util.Consumer)`.

### onMultiWindowModeChanged

```
@RequiresApi(api = 26)
@CallSuper
public void onMultiWindowModeChanged(
    boolean isInMultiWindowMode,
    @NonNull Configuration newConfig
)
```

{@inheritDoc}

Dispatches this call to all listeners added via `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnMultiWindowModeChangedListener(androidx.core.util.Consumer)`.

### onPanelClosed

```
public void onPanelClosed(int featureId, @NonNull Menu menu)
```

### onPictureInPictureModeChanged

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

```
@CallSuper
public void [onPictureInPictureModeChanged](https://developer.android.com/reference/androidx/activity/ComponentActivity#onPictureInPictureModeChanged(kotlin.Boolean))(boolean isInPictureInPictureMode)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in android.app.Activity

{@inheritDoc}

Dispatches this call to all listeners added via `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnPictureInPictureModeChangedListener(androidx.core.util.Consumer)`.

### onPictureInPictureModeChanged

```
@RequiresApi(api = 26)
@CallSuper
public void onPictureInPictureModeChanged(
    boolean isInPictureInPictureMode,
    @NonNull Configuration newConfig
)
```

{@inheritDoc}

Dispatches this call to all listeners added via `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnPictureInPictureModeChangedListener(androidx.core.util.Consumer)`.

### onPictureInPictureUiStateChanged

```
@RequiresApi(api = 31)
@CallSuper
public void onPictureInPictureUiStateChanged(
    @NonNull PictureInPictureUiState pipState
)
```

{@inheritDoc}

### onPreparePanel

```
public boolean onPreparePanel(int featureId, View view, @NonNull Menu menu)
```

### onRequestPermissionsResult

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0)

```
@CallSuper
public void [onRequestPermissionsResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#onRequestPermissionsResult(kotlin.Int,kotlin.Array,kotlin.IntArray))(
    int requestCode,
    @NonNull String[] permissions,
    @NonNull int[] grantResults
)
```

> [!CAUTION]
> **This method is deprecated.**   
> This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. Use {@link #registerForActivityResult(ActivityResultContract, ActivityResultCallback)} passing in a {@link RequestMultiplePermissions} object for the {@link ActivityResultContract} and handling the result in the {@link ActivityResultCallback#onActivityResult(Object) callback}.

{@inheritDoc}

### onRetainCustomNonConfigurationInstance

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

```
public Object [onRetainCustomNonConfigurationInstance](https://developer.android.com/reference/androidx/activity/ComponentActivity#onRetainCustomNonConfigurationInstance())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Use a {@link androidx.lifecycle.ViewModel} to store non config state.

Use this instead of `https://developer.android.com/reference/androidx/activity/ComponentActivity#onRetainNonConfigurationInstance()`. Retrieve later with `https://developer.android.com/reference/androidx/activity/ComponentActivity#lastCustomNonConfigurationInstance()`.

### onRetainNonConfigurationInstance

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

```
public final Object onRetainNonConfigurationInstance()
```

Retain all appropriate non-config state. You can NOT override this yourself! Use a `https://developer.android.com/reference/androidx/lifecycle/ViewModel` if you want to retain your own non config state.

### onTrimMemory

```
@CallSuper
public void onTrimMemory(int level)
```

{@inheritDoc}

Dispatches this call to all listeners added via `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnTrimMemoryListener(androidx.core.util.Consumer)`.

### peekAvailableContext

```
public Context peekAvailableContext()
```

Get the `https://developer.android.com/reference/android/content/Context.html` if it is currently available. If this returns `null`, you can use `https://developer.android.com/reference/androidx/activity/contextaware/ContextAware#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)` to receive a callback for when it available.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/content/Context.html` | the Context if it is currently available. |

### registerForActivityResult

```
public final @NonNull ActivityResultLauncher<@NonNull I> <I extends Object, O extends Object> registerForActivityResult(
    @NonNull ActivityResultContract<@NonNull I, @NonNull O> contract,
    @NonNull ActivityResultCallback<@NonNull O> callback
)
```

Register a request to `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`, designated by the given `https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContract`.

This creates a record in the `https://developer.android.com/reference/androidx/activity/result/ActivityResultRegistry` associated with this caller, managing request code, as well as conversions to/from `https://developer.android.com/reference/android/content/Intent.html` under the hood.

This *must* be called unconditionally, as part of initialization path, typically as a field initializer of an Activity or Fragment.

| Parameters |
|---|---|
| `<I extends https://developer.android.com/reference/java/lang/Object.html>` | the type of the input(if any) required to call the activity |
| `<O extends https://developer.android.com/reference/java/lang/Object.html>` | the type of output returned as an activity result |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContract<@https://developer.android.com/reference/androidx/annotation/NonNull I, @https://developer.android.com/reference/androidx/annotation/NonNull O> contract` | the contract, specifying conversions to/from `https://developer.android.com/reference/android/content/Intent.html`s |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultCallback<@https://developer.android.com/reference/androidx/annotation/NonNull O> callback` | the callback to be called on the main thread when activity result is available |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultLauncher<@https://developer.android.com/reference/androidx/annotation/NonNull I>` | the launcher that can be used to start the activity or dispose of the prepared call. |

### registerForActivityResult

```
public final @NonNull ActivityResultLauncher<@NonNull I> <I extends Object, O extends Object> registerForActivityResult(
    @NonNull ActivityResultContract<@NonNull I, @NonNull O> contract,
    @NonNull ActivityResultRegistry registry,
    @NonNull ActivityResultCallback<@NonNull O> callback
)
```

Register a request to `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`, designated by the given `https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContract`.

This creates a record in the given `https://developer.android.com/reference/androidx/activity/result/ActivityResultRegistry`, managing request code, as well as conversions to/from `https://developer.android.com/reference/android/content/Intent.html` under the hood.

This *must* be called unconditionally, as part of initialization path, typically as a field initializer of an Activity or Fragment.

| Parameters |
|---|---|
| `<I extends https://developer.android.com/reference/java/lang/Object.html>` | the type of the input(if any) required to call the activity |
| `<O extends https://developer.android.com/reference/java/lang/Object.html>` | the type of output returned as an activity result |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContract<@https://developer.android.com/reference/androidx/annotation/NonNull I, @https://developer.android.com/reference/androidx/annotation/NonNull O> contract` | the contract, specifying conversions to/from `https://developer.android.com/reference/android/content/Intent.html`s |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultRegistry registry` | the registry where to hold the record. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultCallback<@https://developer.android.com/reference/androidx/annotation/NonNull O> callback` | the callback to be called on the main thread when activity result is available |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/result/ActivityResultLauncher<@https://developer.android.com/reference/androidx/annotation/NonNull I>` | the launcher that can be used to start the activity or dispose of the prepared call. |

### removeMenuProvider

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

```
public void removeMenuProvider(@NonNull MenuProvider provider)
```

Removes the given `https://developer.android.com/reference/androidx/core/view/MenuProvider` from this `https://developer.android.com/reference/androidx/core/view/MenuHost`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/view/MenuProvider provider` | the MenuProvider to be removed |

### removeOnConfigurationChangedListener

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

```
public final void removeOnConfigurationChangedListener(
    @NonNull Consumer<@NonNull Configuration> listener
)
```

Remove a previously added listener. It will not receive any future callbacks.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Configuration.html> listener` | The listener previously added with `https://developer.android.com/reference/androidx/core/content/OnConfigurationChangedProvider#addOnConfigurationChangedListener(androidx.core.util.Consumer)` that should be removed. |

### removeOnContextAvailableListener

```
public final void removeOnContextAvailableListener(
    @NonNull OnContextAvailableListener listener
)
```

Remove a `https://developer.android.com/reference/androidx/activity/contextaware/OnContextAvailableListener` previously added via `https://developer.android.com/reference/androidx/activity/contextaware/ContextAware#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/contextaware/OnContextAvailableListener listener` | The listener that should be removed. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/activity/contextaware/ContextAware#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener)` |   |

### removeOnMultiWindowModeChangedListener

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

```
public final void removeOnMultiWindowModeChangedListener(
    @NonNull Consumer<@NonNull MultiWindowModeChangedInfo> listener
)
```

Remove a previously added listener. It will not receive any future callbacks.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/MultiWindowModeChangedInfo> listener` | The listener previously added with `https://developer.android.com/reference/androidx/core/app/OnMultiWindowModeChangedProvider#addOnMultiWindowModeChangedListener(androidx.core.util.Consumer)` that should be removed. |

### removeOnNewIntentListener

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

```
public final void removeOnNewIntentListener(@NonNull Consumer<@NonNull Intent> listener)
```

Remove a previously added listener. It will not receive any future callbacks.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html> listener` | The listener previously added with `https://developer.android.com/reference/androidx/core/app/OnNewIntentProvider#addOnNewIntentListener(androidx.core.util.Consumer)` that should be removed. |

### removeOnPictureInPictureModeChangedListener

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

```
public final void removeOnPictureInPictureModeChangedListener(
    @NonNull Consumer<@NonNull PictureInPictureModeChangedInfo> listener
)
```

Remove a previously added listener. It will not receive any future callbacks.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureModeChangedInfo> listener` | The listener previously added with `https://developer.android.com/reference/androidx/core/app/OnPictureInPictureModeChangedProvider#addOnPictureInPictureModeChangedListener(androidx.core.util.Consumer)` that should be removed. |

### removeOnPictureInPictureUiStateChangedListener

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

```
public final void removeOnPictureInPictureUiStateChangedListener(
    @NonNull Consumer<@NonNull PictureInPictureUiStateCompat> listener
)
```

Remove a previously added listener. It will not receive any future callbacks.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureUiStateCompat> listener` | The listener previously added with `https://developer.android.com/reference/androidx/core/app/OnPictureInPictureUiStateChangedProvider#addOnPictureInPictureUiStateChangedListener(androidx.core.util.Consumer)` that should be removed. |

### removeOnTrimMemoryListener

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

```
public final void removeOnTrimMemoryListener(@NonNull Consumer<@NonNull Integer> listener)
```

Remove a previously added listener. It will not receive any future callbacks.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> listener` | The listener previously added with .addOnTrimMemoryListener that should be removed. |

### removeOnUserLeaveHintListener

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

```
public final void removeOnUserLeaveHintListener(@NonNull Runnable listener)
```

Remove a previously added listener. It will not receive any future callbacks.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Runnable.html listener` | The listener previously added with `https://developer.android.com/reference/androidx/core/app/OnUserLeaveHintProvider#addOnUserLeaveHintListener(java.lang.Runnable)` that should be removed. |

### reportFullyDrawn

```
public void reportFullyDrawn()
```

### setContentView

```
public void setContentView(@LayoutRes int layoutResID)
```

### setContentView

```
public void setContentView(View view)
```

### setContentView

```
public void setContentView(View view, ViewGroup.LayoutParams params)
```

### setPictureInPictureParams

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

```
public final void setPictureInPictureParams(@NonNull PictureInPictureParamsCompat params)
```

Available since API 26 in the framework Activity class, updates the properties of the picture-in-picture activity, or sets it to be used later when `https://developer.android.com/reference/androidx/core/app/PictureInPictureProvider#enterPictureInPictureMode(androidx.core.app.PictureInPictureParamsCompat)` is called

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/app/PictureInPictureParamsCompat params` | `https://developer.android.com/reference/android/app/PictureInPictureParams.html` to use for picture-in-picture mode. |

### startActivityForResult

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0)

```
public void [startActivityForResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#startActivityForResult(android.content.Intent,kotlin.Int))(@NonNull Intent intent, int requestCode)
```

> [!CAUTION]
> **This method is deprecated.**   
> This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. Use {@link #registerForActivityResult(ActivityResultContract, ActivityResultCallback)} passing in a {@link StartActivityForResult} object for the {@link ActivityResultContract}.

{@inheritDoc}

### startActivityForResult

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0)

```
public void [startActivityForResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#startActivityForResult(android.content.Intent,kotlin.Int,android.os.Bundle))(
    @NonNull Intent intent,
    int requestCode,
    Bundle options
)
```

> [!CAUTION]
> **This method is deprecated.**   
> This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. Use {@link #registerForActivityResult(ActivityResultContract, ActivityResultCallback)} passing in a {@link StartActivityForResult} object for the {@link ActivityResultContract}.

{@inheritDoc}

### startIntentSenderForResult

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0)

```
public void [startIntentSenderForResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#startIntentSenderForResult(android.content.IntentSender,kotlin.Int,android.content.Intent,kotlin.Int,kotlin.Int,kotlin.Int))(
    @NonNull IntentSender intent,
    int requestCode,
    Intent fillInIntent,
    int flagsMask,
    int flagsValues,
    int extraFlags
)
```

> [!CAUTION]
> **This method is deprecated.**   
> This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. Use {@link #registerForActivityResult(ActivityResultContract, ActivityResultCallback)} passing in a {@link StartIntentSenderForResult} object for the {@link ActivityResultContract}.

{@inheritDoc}

### startIntentSenderForResult

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0)

```
public void [startIntentSenderForResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#startIntentSenderForResult(android.content.IntentSender,kotlin.Int,android.content.Intent,kotlin.Int,kotlin.Int,kotlin.Int,android.os.Bundle))(
    @NonNull IntentSender intent,
    int requestCode,
    Intent fillInIntent,
    int flagsMask,
    int flagsValues,
    int extraFlags,
    Bundle options
)
```

> [!CAUTION]
> **This method is deprecated.**   
> This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. Use {@link #registerForActivityResult(ActivityResultContract, ActivityResultCallback)} passing in a {@link StartIntentSenderForResult} object for the {@link ActivityResultContract}.

{@inheritDoc}

## Protected methods

### onActivityResult

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0)

```
@CallSuper
protected void [onActivityResult](https://developer.android.com/reference/androidx/activity/ComponentActivity#onActivityResult(kotlin.Int,kotlin.Int,android.content.Intent))(int requestCode, int resultCode, Intent data)
```

> [!CAUTION]
> **This method is deprecated.**   
> This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity. Use {@link #registerForActivityResult(ActivityResultContract, ActivityResultCallback)} with the appropriate {@link ActivityResultContract} and handling the result in the {@link ActivityResultCallback#onActivityResult(Object) callback}.

{@inheritDoc}

### onCreate

```
protected void onCreate(Bundle savedInstanceState)
```

{@inheritDoc}

If your ComponentActivity is annotated with `https://developer.android.com/reference/androidx/annotation/ContentView`, this will call `https://developer.android.com/reference/androidx/activity/ComponentActivity#setContentView(kotlin.Int)` for you.

### onNewIntent

```
@CallSuper
protected void onNewIntent(@NonNull Intent intent)
```

{@inheritDoc}

Dispatches this call to all listeners added via `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnNewIntentListener(androidx.core.util.Consumer)`.

### onSaveInstanceState

```
@CallSuper
protected void onSaveInstanceState(@NonNull Bundle outState)
```

### onUserLeaveHint

```
@CallSuper
protected void onUserLeaveHint()
```

{@inheritDoc}

Dispatches this call to all listeners added via `https://developer.android.com/reference/androidx/activity/ComponentActivity#addOnUserLeaveHintListener(java.lang.Runnable)`.

## Extension functions

### ActivityViewModelLazyKt.viewModels

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/ActivityViewModelLazy.kt+function:viewModels)

```
@MainThread
public final @NonNull Lazy<@NonNull VM> <VM extends ViewModel> ActivityViewModelLazyKt.viewModels(
    @NonNull ComponentActivity receiver,
    Function0<@NonNull CreationExtras> extrasProducer,
    Function0<@NonNull ViewModelProvider.Factory> factoryProducer
)
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-lazy/index.html` delegate to access the ComponentActivity's ViewModel, if `https://developer.android.com/reference/androidx/activity/package-summary#(androidx.activity.ComponentActivity).viewModels(kotlin.Function0,kotlin.Function0)` is specified then `https://developer.android.com/reference/androidx/lifecycle/ViewModelProvider.Factory` returned by it will be used to create `https://developer.android.com/reference/androidx/lifecycle/ViewModel` first time.

```
class MyComponentActivity : ComponentActivity() {
    val viewmodel: MyViewModel by viewModels()
}
```

This property can be accessed only after the Activity is attached to the Application, and access prior to that will result in IllegalArgumentException.

### ActivityViewModelLazyKt.viewModels

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/ActivityViewModelLazy.kt+function:viewModels)

```
@MainThread
public final @NonNull Lazy<@NonNull T> <T extends ViewModel> ActivityViewModelLazyKt.viewModels(
    @NonNull ComponentActivity receiver,
    @NonNull String key,
    Function0<@NonNull CreationExtras> extrasProducer,
    Function0<@NonNull ViewModelProvider.Factory> factoryProducer
)
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-lazy/index.html` delegate for this `https://developer.android.com/reference/androidx/activity/ComponentActivity`'s `https://developer.android.com/reference/androidx/lifecycle/ViewModel` identified by `https://developer.android.com/reference/androidx/activity/package-summary#(androidx.activity.ComponentActivity).viewModels(kotlin.String,kotlin.Function0,kotlin.Function0)`.

Delegates with the same `https://developer.android.com/reference/androidx/activity/package-summary#(androidx.activity.ComponentActivity).viewModels(kotlin.String,kotlin.Function0,kotlin.Function0)` and `https://developer.android.com/reference/androidx/lifecycle/ViewModel` type share the same instance. Different keys allow multiple instances of the same `https://developer.android.com/reference/androidx/lifecycle/ViewModel` type in this activity.

```
class MyComponentActivity : ComponentActivity() {
    val primaryViewModel: MyViewModel by viewModels(key = "primary")
    val secondaryViewModel: MyViewModel by viewModels(key = "secondary")
}
```

This property can be accessed only after the Activity is attached to the Application. Access before that results in an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | identifier used to store and retrieve the `https://developer.android.com/reference/androidx/lifecycle/ViewModel` |
| `Function0<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/viewmodel/CreationExtras> extrasProducer` | producer of the `https://developer.android.com/reference/androidx/lifecycle/viewmodel/CreationExtras` used to create the `https://developer.android.com/reference/androidx/lifecycle/ViewModel` |
| `Function0<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/lifecycle/ViewModelProvider.Factory> factoryProducer` | producer of the `https://developer.android.com/reference/androidx/lifecycle/ViewModelProvider.Factory` used to create the `https://developer.android.com/reference/androidx/lifecycle/ViewModel` |

### AuthenticationUtils.registerForAuthenticationResult

Artifact: [androidx.biometric:biometric](https://developer.android.com/jetpack/androidx/releases/biometric) [View Source](https://cs.android.com/search?q=file:androidx/biometric/AuthenticationExtensions.kt+function:registerForAuthenticationResult)

```
public final @NonNull AuthenticationResultLauncher AuthenticationUtils.registerForAuthenticationResult(
    @NonNull ComponentActivity receiver,
    @NonNull AuthenticationResultCallback resultCallback
)
```

Returns an `https://developer.android.com/reference/androidx/biometric/AuthenticationResultLauncher` that can be used to initiate authentication.

A success or error result will be delivered to `https://developer.android.com/reference/androidx/biometric/AuthenticationResultCallback#onAuthResult(androidx.biometric.AuthenticationResult)` and (one or more) failures will be delivered to `https://developer.android.com/reference/androidx/biometric/AuthenticationResultCallback#onAuthAttemptFailed()`, which is set by `https://developer.android.com/reference/androidx/biometric/package-summary#(androidx.activity.ComponentActivity).registerForAuthenticationResult(androidx.biometric.AuthenticationResultCallback)`. The callback will be executed on the main thread.

This *must* be called unconditionally, as part of initialization path, typically as a field initializer of an Activity.

Note that if multiple calls to this method are made within a single Fragment or Activity, only the callback registered by the last invocation will be saved and receive authentication results. This can result in unexpected behavior if you intend to manage multiple independent authentication flows. It is strongly recommended to avoid multiple calls to this method in such scenarios.

```kotlin
import androidx.activity.ComponentActivity
import androidx.biometric.AuthenticationRequest
import androidx.biometric.AuthenticationRequest.Biometric
import androidx.biometric.AuthenticationRequest.Companion.biometricRequest
import androidx.biometric.AuthenticationResult
import androidx.biometric.AuthenticationResultCallback
import androidx.biometric.PromptContentItemBulletedText
import androidx.biometric.registerForAuthenticationResult

class MyActivityForBiometricAuth : ComponentActivity() {
    val requestAuthentication =
        registerForAuthenticationResult(
            object : AuthenticationResultCallback {
                override fun onAuthResult(result: AuthenticationResult) {
                    when (result) {
                        // Handle successful authentication
                        is AuthenticationResult.Success -> {
                            Log.i(TAG, "onAuthenticationSucceeded with type ${result.authType}")
                        }
                        // Handle authentication error, e.g. user cancellation, lockout errors,
                        // etc
                        is AuthenticationResult.Error -> {
                            Log.i(
                                TAG,
                                "onAuthenticationError " +
                                    "with error code: ${result.errorCode} " +
                                    "and error string: ${result.errString}",
                            )
                        }
                        // Handle fallback option clicks
                        is AuthenticationResult.CustomFallbackSelected -> {
                            Log.i(TAG, "fallback is selected, text: ${result.fallback.text}")
                        }
                    }
                }

                // Handle intermediate authentication failure, this is optional and
                // not needed in most cases
                override fun onAuthAttemptFailed() {
                    Log.i(TAG, "onAuthenticationFailed, try again")
                }
            }
        )

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val authRequest =
            biometricRequest(
                title = "Title",
                Biometric.Fallback.DeviceCredential,
                Biometric.Fallback.CustomOption(
                    text = "Use account password",
                    iconType = Biometric.Fallback.ICON_TYPE_PASSWORD,
                ),
            ) {
                setSubtitle("Subtitle")
                setContent(
                    AuthenticationRequest.BodyContent.VerticalList(
                        "Vertical list description",
                        listOf(
                            PromptContentItemBulletedText("test item1"),
                            PromptContentItemBulletedText("test item2"),
                        ),
                    )
                )
                setMinStrength(Biometric.Strength.Class2)
                setIsConfirmationRequired(true)
            }

        Button(this).setOnClickListener { requestAuthentication.launch(authRequest) }
    }
}
```

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/biometric/package-summary#(androidx.activity.ComponentActivity).registerForAuthenticationResult(java.util.concurrent.Executor,androidx.biometric.AuthenticationResultCallback)` | (Executor, AuthenticationResultCallback) |

### AuthenticationUtils.registerForAuthenticationResult

Artifact: [androidx.biometric:biometric](https://developer.android.com/jetpack/androidx/releases/biometric) [View Source](https://cs.android.com/search?q=file:androidx/biometric/AuthenticationExtensions.kt+function:registerForAuthenticationResult)

```
public final @NonNull AuthenticationResultLauncher AuthenticationUtils.registerForAuthenticationResult(
    @NonNull ComponentActivity receiver,
    @NonNull Executor callbackExecutor,
    @NonNull AuthenticationResultCallback resultCallback
)
```

Returns an `https://developer.android.com/reference/androidx/biometric/AuthenticationResultLauncher` that can be used to initiate authentication.

A success or error result will be delivered to `https://developer.android.com/reference/androidx/biometric/AuthenticationResultCallback#onAuthResult(androidx.biometric.AuthenticationResult)` and (one or more) failures will be delivered to `https://developer.android.com/reference/androidx/biometric/AuthenticationResultCallback#onAuthAttemptFailed()`, which is set by `https://developer.android.com/reference/androidx/biometric/package-summary#(androidx.activity.ComponentActivity).registerForAuthenticationResult(java.util.concurrent.Executor,androidx.biometric.AuthenticationResultCallback)`. The callback will be executed on the thread provided by the `https://developer.android.com/reference/androidx/biometric/package-summary#(androidx.activity.ComponentActivity).registerForAuthenticationResult(java.util.concurrent.Executor,androidx.biometric.AuthenticationResultCallback)`.

This *must* be called unconditionally, as part of initialization path, typically as a field initializer of an Activity.

Note that if multiple calls to this method are made within a single Fragment or Activity, only the callback registered by the last invocation will be saved and receive authentication results. This can result in unexpected behavior if you intend to manage multiple independent authentication flows. It is strongly recommended to avoid multiple calls to this method in such scenarios.

```kotlin
import androidx.activity.ComponentActivity
import androidx.biometric.AuthenticationRequest
import androidx.biometric.AuthenticationRequest.Biometric
import androidx.biometric.AuthenticationRequest.Companion.biometricRequest
import androidx.biometric.AuthenticationResult
import androidx.biometric.AuthenticationResultCallback
import androidx.biometric.PromptContentItemBulletedText
import androidx.biometric.registerForAuthenticationResult

class MyActivityForBiometricAuth : ComponentActivity() {
    val requestAuthentication =
        registerForAuthenticationResult(
            object : AuthenticationResultCallback {
                override fun onAuthResult(result: AuthenticationResult) {
                    when (result) {
                        // Handle successful authentication
                        is AuthenticationResult.Success -> {
                            Log.i(TAG, "onAuthenticationSucceeded with type ${result.authType}")
                        }
                        // Handle authentication error, e.g. user cancellation, lockout errors,
                        // etc
                        is AuthenticationResult.Error -> {
                            Log.i(
                                TAG,
                                "onAuthenticationError " +
                                    "with error code: ${result.errorCode} " +
                                    "and error string: ${result.errString}",
                            )
                        }
                        // Handle fallback option clicks
                        is AuthenticationResult.CustomFallbackSelected -> {
                            Log.i(TAG, "fallback is selected, text: ${result.fallback.text}")
                        }
                    }
                }

                // Handle intermediate authentication failure, this is optional and
                // not needed in most cases
                override fun onAuthAttemptFailed() {
                    Log.i(TAG, "onAuthenticationFailed, try again")
                }
            }
        )

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val authRequest =
            biometricRequest(
                title = "Title",
                Biometric.Fallback.DeviceCredential,
                Biometric.Fallback.CustomOption(
                    text = "Use account password",
                    iconType = Biometric.Fallback.ICON_TYPE_PASSWORD,
                ),
            ) {
                setSubtitle("Subtitle")
                setContent(
                    AuthenticationRequest.BodyContent.VerticalList(
                        "Vertical list description",
                        listOf(
                            PromptContentItemBulletedText("test item1"),
                            PromptContentItemBulletedText("test item2"),
                        ),
                    )
                )
                setMinStrength(Biometric.Strength.Class2)
                setIsConfirmationRequired(true)
            }

        Button(this).setOnClickListener { requestAuthentication.launch(authRequest) }
    }
}
```

### ContentPip.disablePipOnAppSwitch

Artifact: [androidx.core:core-pip](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/pip/contentpip/ContentPipExt.kt+function:disablePipOnAppSwitch)

```
public final void ContentPip.disablePipOnAppSwitch(
    @NonNull ComponentActivity receiver,
    @NonNull ContentPipToken contentPipToken
)
```

Disables entering PiP on app switch for this Activity with Content PiP.

This method unregisters the listeners and observers that were added by `https://developer.android.com/reference/androidx/core/pip/contentpip/package-summary#(androidx.activity.ComponentActivity).enablePipOnAppSwitch(androidx.core.pip.contentpip.ContentPipCallback)`. It restores the original window callback and stops monitoring lifecycle and exit hints.

**Threading:** This method must be called on the main thread of your application.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/contentpip/ContentPipToken contentPipToken` | The token returned by `https://developer.android.com/reference/androidx/core/pip/contentpip/package-summary#(androidx.activity.ComponentActivity).enablePipOnAppSwitch(androidx.core.pip.contentpip.ContentPipCallback)`. |

### ContentPip.enablePipOnAppSwitch

Artifact: [androidx.core:core-pip](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/pip/contentpip/ContentPipExt.kt+function:enablePipOnAppSwitch)

```
public final @NonNull ContentPipToken ContentPip.enablePipOnAppSwitch(
    @NonNull ComponentActivity receiver,
    @NonNull ContentPipCallback callback
)
```

Enables entering PiP on app switch for this Activity with Content PiP.

This API hooks into standard Activity exit hints to trigger a fallback PiP pipeline when native [Auto-Enter](https://developer.android.com/reference/android/app/PictureInPictureParams#isAutoEnterEnabled()) is suppressed by the OS (e.g. on Quick Switch).

It also automatically monitors the Activity lifecycle and user interactions to "pull back" the player and terminate the fallback task when the user returns to the app.

It is recommended to call this method from `https://developer.android.com/reference/androidx/activity/ComponentActivity#onCreate(android.os.Bundle)`, if it is called multiple times, only the last `https://developer.android.com/reference/androidx/core/pip/contentpip/ContentPipCallback` is effective.

**Threading:** This callback is strictly tied to the UI toolkit and will **always** be executed synchronously on the main thread of your application.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/contentpip/ContentPipCallback callback` | The callback to manage handoff between tasks. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/contentpip/ContentPipToken` | `https://developer.android.com/reference/androidx/core/pip/contentpip/ContentPipToken` that caller can pass to `https://developer.android.com/reference/androidx/core/pip/contentpip/package-summary#(androidx.activity.ComponentActivity).disablePipOnAppSwitch(androidx.core.pip.contentpip.ContentPipToken)`. |

### EdgeToEdge.enableEdgeToEdge

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/EdgeToEdge.kt+function:enableEdgeToEdge)

```
public final void EdgeToEdge.[enableEdgeToEdge](https://developer.android.com/reference/androidx/activity/ComponentActivity#(androidx.activity.ComponentActivity).enableEdgeToEdge(androidx.activity.SystemBarStyle,androidx.activity.SystemBarStyle))(
    @NonNull ComponentActivity receiver,
    @NonNull SystemBarStyle statusBarStyle,
    @NonNull SystemBarStyle navigationBarStyle
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Use {@link WindowCompat#enableEdgeToEdge(Window)} to enable edge-to-edge display. To adjust the light/dark appearance of system bar icons, use {@link WindowInsetsControllerCompat#setAppearanceLightStatusBars(boolean)} or {@link WindowInsetsControllerCompat#setAppearanceLightNavigationBars(boolean)}. To add scrim or background protection, use {@link ProtectionLayout} or handle insets directly in your view hierarchy, use this instead:
>
> ```
> WindowCompat.enableEdgeToEdge(window)
> ```

Enables the edge-to-edge display for this `https://developer.android.com/reference/androidx/activity/ComponentActivity`.

To set it up with the default style, call this method in your Activity's onCreate method:

```
    override fun onCreate(savedInstanceState: Bundle?) {
        enableEdgeToEdge()
        super.onCreate(savedInstanceState)
        ...
    }
```

The default style configures the system bars with a transparent background when contrast can be enforced by the system (API 29 or above). On older platforms (which only have 3-button/2-button navigation modes), an equivalent scrim is applied to ensure contrast with the system bars.

See `https://developer.android.com/reference/androidx/activity/SystemBarStyle` for more customization options.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/SystemBarStyle statusBarStyle` | The `https://developer.android.com/reference/androidx/activity/SystemBarStyle` for the status bar. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/activity/SystemBarStyle navigationBarStyle` | The `https://developer.android.com/reference/androidx/activity/SystemBarStyle` for the navigation bar. |