# AmbientModeSupport

Artifact: [androidx.wear:wear](https://developer.android.com/jetpack/androidx/releases/wear) [View Source](https://cs.android.com/search?q=file:androidx/wear/ambient/AmbientModeSupport.java+class:androidx.wear.ambient.AmbientModeSupport) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear#1.1.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear#1.3.0)

*** ** * ** ***


```
class AmbientModeSupport : Fragment
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.fragment.app.Fragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment) ||
|   | ↳ | [androidx.wear.ambient.AmbientModeSupport](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientLifecycleObserver` instead. These classes use lifecycle components instead, preventing the need to hook these events using fragments.

Use this as a headless Fragment to add ambient support to an Activity on Wearable devices.

The application that uses this should add the `https://developer.android.com/reference/android/Manifest.permission.html#WAKE_LOCK` permission to its manifest.

The following describes the general use of this class:

Create a subclass of one of the `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity` classes and implement the `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallbackProvider` interface. Override the `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallbackProvider#getAmbientCallback()` method to provide the callbacks required for reacting to the ambient events from the Android system. If a valid `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallback` is not provided (either no implementation of the `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallbackProvider` interface, or returning null from `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallbackProvider#getAmbientCallback()`), then ambient mode will NOT be enabled.

The primary entry point for this code is the `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#attach(T)` method. It should be called with an `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity` as an argument and that `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity` will then be able to receive ambient lifecycle events through an `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallback`. The `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity` will also receive a `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController` object from the attachment which can be used to query the current status of the ambient mode.

An example of how to implement the `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallbackProvider` interface, attach `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport` to your `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity` and use the `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController` can be found below:

```kotlin
public class MyActivity extends FragmentActivity
    implements AmbientModeSupport.AmbientCallbackProvider {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState)
        ...
        AmbientModeSupport.AmbientController controller = AmbientModeSupport.attach(this);
        boolean isAmbient = controller.isAmbient();
    }
    @Override
    AmbientModeSupport.AmbientCallback getAmbientCallback() {
        return new AmbientModeSupport.AmbientCallback() {
            public void onEnterAmbient(Bundle ambientDetails) {...}
            public void onExitAmbient(Bundle ambientDetails) {...}
        }
    }
}
```

## Summary

| ### Nested types |
|---|
| `abstract class https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallback` **This class is deprecated.** Deprecated in Java |
| `interface https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallbackProvider` **This interface is deprecated.** Deprecated in Java |
| `inner class https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController` **This class is deprecated.** Deprecated in Java |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#EXTRA_BURN_IN_PROTECTION() = "com.google.android.wearable.compat.extra.BURN_IN_PROTECTION"` **This property is deprecated.** Deprecated in Java |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#EXTRA_LOWBIT_AMBIENT() = "com.google.android.wearable.compat.extra.LOWBIT_AMBIENT"` **This property is deprecated.** Deprecated in Java |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#FRAGMENT_TAG() = "android.support.wearable.ambient.AmbientMode"` **This property is deprecated.** Deprecated in Java |

| ### Public constructors |
|---|
| `[AmbientModeSupport](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#AmbientModeSupport())()` **This function is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController!` | `<T : https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity?> [attach](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#attach(T))(activity: T!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[dump](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#dump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[]))( prefix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, fd: https://developer.android.com/reference/java/io/FileDescriptor.html!, writer: https://developer.android.com/reference/java/io/PrintWriter.html!, args: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>! )` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper [onAttach](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onAttach(android.content.Context))(context: https://developer.android.com/reference/android/content/Context.html!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper [onCreate](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onCreate(android.os.Bundle))(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper [onDestroy](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onDestroy())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper [onDetach](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onDetach())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper [onPause](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onPause())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper [onResume](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onResume())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper [onStop](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onStop())()` **This function is deprecated.** Deprecated in Java |

### Inherited functions

From [androidx.activity.result.ActivityResultCaller](https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller) `abstract https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher<I!>!` `<I, O> [registerForActivityResult](https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract<I,O>,androidx.activity.result.ActivityResultCallback<O>))(
contract: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract<I!, O!>!,
callback: https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCallback<O!>!
)`

**This function is deprecated.** Deprecated in Java
From [android.content.ComponentCallbacks](https://developer.android.com/reference/android/content/ComponentCallbacks.html) `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onConfigurationChanged](https://developer.android.com/reference/android/content/ComponentCallbacks.html#onConfigurationChanged(android.content.res.Configuration))(p: https://developer.android.com/reference/android/content/res/Configuration.html!)`

**This function is deprecated.** Deprecated in Java
`abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onLowMemory](https://developer.android.com/reference/android/content/ComponentCallbacks.html#onLowMemory())()`

**This function is deprecated.**
From [androidx.activity.contextaware.ContextAware](https://developer.android.com/reference/kotlin/androidx/activity/contextaware/ContextAware) `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[addOnContextAvailableListener](https://developer.android.com/reference/kotlin/androidx/activity/contextaware/ContextAware#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener))(listener: https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener!)`

**This function is deprecated.** Deprecated in Java
`abstract https://developer.android.com/reference/android/content/Context.html!` `[peekAvailableContext](https://developer.android.com/reference/kotlin/androidx/activity/contextaware/ContextAware#peekAvailableContext())()`

**This function is deprecated.** Deprecated in Java
`abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[removeOnContextAvailableListener](https://developer.android.com/reference/kotlin/androidx/activity/contextaware/ContextAware#removeOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener))(listener: https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener!)`

**This function is deprecated.** Deprecated in Java
From [androidx.fragment.app.Fragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[addOnContextAvailableListener](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#addOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener))(listener: https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[equals](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#equals(java.lang.Object))(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity?` `[getActivity](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getActivity())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getAllowEnterTransitionOverlap](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getAllowEnterTransitionOverlap())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getAllowReturnTransitionOverlap](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getAllowReturnTransitionOverlap())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/os/Bundle.html?` `[getArguments](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getArguments())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager` `[getChildFragmentManager](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getChildFragmentManager())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html?` `[getContext](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getContext())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/lifecycle/viewmodel/CreationExtras` `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[getDefaultViewModelCreationExtras](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getDefaultViewModelCreationExtras())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory` `[getDefaultViewModelProviderFactory](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getDefaultViewModelProviderFactory())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `[getEnterTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getEnterTransition())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `[getExitTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getExitTransition())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager?` `[getFragmentManager](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getFragmentManager())()`

**This function is deprecated.**

This has been removed in favor of `getParentFragmentManager()` which throws an `https://developer.android.com/reference/java/lang/IllegalStateException.html` if the FragmentManager is null.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `[getHost](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getHost())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[getId](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getId())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/view/LayoutInflater.html` `[getLayoutInflater](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getLayoutInflater())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` `[getLifecycle](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getLifecycle())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/loader/app/LoaderManager` `[getLoaderManager](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getLoaderManager())()`

**This function is deprecated.**

Use `https://developer.android.com/reference/kotlin/androidx/loader/app/LoaderManager#getInstance(T)`.

<br />

`https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment?` `[getParentFragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getParentFragment())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager` `[getParentFragmentManager](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getParentFragmentManager())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `[getReenterTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getReenterTransition())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/res/Resources.html` `[getResources](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getResources())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getRetainInstance](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getRetainInstance())()`

**This function is deprecated.**

Instead of retaining the Fragment itself, use a non-retained Fragment and keep retained state in a ViewModel attached to that Fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `[getReturnTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getReturnTransition())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistry` `[getSavedStateRegistry](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getSavedStateRegistry())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `[getSharedElementEnterTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getSharedElementEnterTransition())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `[getSharedElementReturnTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getSharedElementReturnTransition())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `[getString](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getString(int))(resId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `[getString](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getString(int,java.lang.Object...))(resId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, formatArgs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` `[getTag](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getTag())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment?` `[getTargetFragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getTargetFragment())()`

**This function is deprecated.**

Instead of using a target fragment to pass results, use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#setFragmentResult(java.lang.String,android.os.Bundle)` to deliver results to `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentResultListener` instances registered by other fragments via `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#setFragmentResultListener(java.lang.String,androidx.lifecycle.LifecycleOwner,androidx.fragment.app.FragmentResultListener)`.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[getTargetRequestCode](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getTargetRequestCode())()`

**This function is deprecated.**

When using the target fragment replacement of `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#setFragmentResultListener(java.lang.String,androidx.lifecycle.LifecycleOwner,androidx.fragment.app.FragmentResultListener)` and `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#setFragmentResult(java.lang.String,android.os.Bundle)`, consider using `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setArguments(android.os.Bundle)` to pass a `requestKey` if you need to support dynamic request keys.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` `[getText](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getText(int))(resId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getUserVisibleHint](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getUserVisibleHint())()`

**This function is deprecated.**

Use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentTransaction#setMaxLifecycle(androidx.fragment.app.Fragment,androidx.lifecycle.Lifecycle.State)` instead.

<br />

`https://developer.android.com/reference/android/view/View.html?` `[getView](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getView())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[getViewLifecycleOwner](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getViewLifecycleOwner())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner!>` `[getViewLifecycleOwnerLiveData](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getViewLifecycleOwnerLiveData())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStore` `[getViewModelStore](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getViewModelStore())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[hashCode](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#hashCode())()`

**This function is deprecated.** Deprecated in Java
`java-static https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` `[instantiate](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#instantiate(android.content.Context,java.lang.String))(context: https://developer.android.com/reference/android/content/Context.html, fname: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

**This function is deprecated.**

Use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#getFragmentFactory()` and `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentFactory#instantiate(java.lang.ClassLoader,java.lang.String)`

<br />

`java-static https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` `[instantiate](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#instantiate(android.content.Context,java.lang.String,android.os.Bundle))(context: https://developer.android.com/reference/android/content/Context.html, fname: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, args: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.**

Use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#getFragmentFactory()` and `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentFactory#instantiate(java.lang.ClassLoader,java.lang.String)`, manually calling `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setArguments(android.os.Bundle)` on the returned Fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isAdded](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isAdded())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isDetached](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isDetached())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isHidden](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isHidden())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isInLayout](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isInLayout())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isRemoving](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isRemoving())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isResumed](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isResumed())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isStateSaved](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isStateSaved())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isVisible](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#isVisible())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onActivityCreated](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onActivityCreated(android.os.Bundle))(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.**

use `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onViewCreated(android.view.View,android.os.Bundle)` for code touching the view created by `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)` and `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreate(android.os.Bundle)` for other initialization.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onActivityResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onActivityResult(int,int,android.content.Intent))(requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, resultCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, data: https://developer.android.com/reference/android/content/Intent.html?)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onAttach](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onAttach(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html)`

**This function is deprecated.**

See `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onAttach(android.content.Context)`.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onAttachFragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onAttachFragment(androidx.fragment.app.Fragment))(childFragment: https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment)`

**This function is deprecated.**

The responsibility for listening for fragments being attached has been moved to FragmentManager.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onConfigurationChanged](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onConfigurationChanged(android.content.res.Configuration))(newConfig: https://developer.android.com/reference/android/content/res/Configuration.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onContextItemSelected](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onContextItemSelected(android.view.MenuItem))(item: https://developer.android.com/reference/android/view/MenuItem.html)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/view/animation/Animation.html?` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onCreateAnimation](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateAnimation(int,boolean,int))(transit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, enter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, nextAnim: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/animation/Animator.html?` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onCreateAnimator](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateAnimator(int,boolean,int))(transit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, enter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, nextAnim: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onCreateContextMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateContextMenu(android.view.ContextMenu,android.view.View,android.view.ContextMenu.ContextMenuInfo))(
menu: https://developer.android.com/reference/android/view/ContextMenu.html,
v: https://developer.android.com/reference/android/view/View.html,
menuInfo: https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html?
)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onCreateOptionsMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateOptionsMenu(android.view.Menu,android.view.MenuInflater))(menu: https://developer.android.com/reference/android/view/Menu.html, inflater: https://developer.android.com/reference/android/view/MenuInflater.html)`

**This function is deprecated.**

`https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` now implements `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`, an interface that allows any component, including your activity itself, to add menu items by calling `https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity#addMenuProvider(androidx.core.view.MenuProvider)` without forcing all components through this single method override.

<br />

`https://developer.android.com/reference/android/view/View.html?` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onCreateView](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))(
inflater: https://developer.android.com/reference/android/view/LayoutInflater.html,
container: https://developer.android.com/reference/android/view/ViewGroup.html?,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?
)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onDestroyOptionsMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onDestroyOptionsMenu())()`

**This function is deprecated.**

`https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` now implements `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`, an interface that allows any component, including your activity itself, to add menu items by calling `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost#addMenuProvider(androidx.core.view.MenuProvider)` without forcing all components through this single method override.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onDestroyView](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onDestroyView())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/view/LayoutInflater.html` `[onGetLayoutInflater](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onGetLayoutInflater(android.os.Bundle))(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onHiddenChanged](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onHiddenChanged(boolean))(hidden: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onInflate](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onInflate(android.app.Activity,android.util.AttributeSet,android.os.Bundle))(
activity: https://developer.android.com/reference/android/app/Activity.html,
attrs: https://developer.android.com/reference/android/util/AttributeSet.html,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?
)`

**This function is deprecated.**

See `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onInflate(android.content.Context,android.util.AttributeSet,android.os.Bundle)`.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onInflate](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onInflate(android.content.Context,android.util.AttributeSet,android.os.Bundle))(
context: https://developer.android.com/reference/android/content/Context.html,
attrs: https://developer.android.com/reference/android/util/AttributeSet.html,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?
)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onLowMemory](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onLowMemory())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onMultiWindowModeChanged](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onMultiWindowModeChanged(boolean))(isInMultiWindowMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onOptionsItemSelected](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onOptionsItemSelected(android.view.MenuItem))(item: https://developer.android.com/reference/android/view/MenuItem.html)`

**This function is deprecated.**

`https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` now implements `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`, an interface that allows any component, including your activity itself, to add menu items by calling `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost#addMenuProvider(androidx.core.view.MenuProvider)` without forcing all components through this single method override.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onOptionsMenuClosed](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onOptionsMenuClosed(android.view.Menu))(menu: https://developer.android.com/reference/android/view/Menu.html)`

**This function is deprecated.**

`https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` now implements `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`, an interface that allows any component, including your activity itself, to add menu items by calling `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost#addMenuProvider(androidx.core.view.MenuProvider)` without forcing all components through this single method override.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onPictureInPictureModeChanged](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onPictureInPictureModeChanged(boolean))(isInPictureInPictureMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onPrepareOptionsMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onPrepareOptionsMenu(android.view.Menu))(menu: https://developer.android.com/reference/android/view/Menu.html)`

**This function is deprecated.**

`https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity` now implements `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`, an interface that allows any component, including your activity itself, to add menu items by calling `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost#addMenuProvider(androidx.core.view.MenuProvider)` without forcing all components through this single method override.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onPrimaryNavigationFragmentChanged](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onPrimaryNavigationFragmentChanged(boolean))(
isPrimaryNavigationFragment: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html
)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onRequestPermissionsResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onRequestPermissionsResult(int,java.lang.String[],int[]))(
requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
permissions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>,
grantResults: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>
)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onSaveInstanceState](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onSaveInstanceState(android.os.Bundle))(outState: https://developer.android.com/reference/android/os/Bundle.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onStart](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onStart())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
[onViewCreated](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onViewCreated(android.view.View,android.os.Bundle))(view: https://developer.android.com/reference/android/view/View.html, savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper
[onViewStateRestored](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onViewStateRestored(android.os.Bundle))(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html?` `[peekAvailableContext](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#peekAvailableContext())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[postponeEnterTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#postponeEnterTransition())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[postponeEnterTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#postponeEnterTransition(long,java.util.concurrent.TimeUnit))(duration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, timeUnit: https://developer.android.com/reference/java/util/concurrent/TimeUnit.html)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher<I!>` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
<I, O> [registerForActivityResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract<I,O>,androidx.activity.result.ActivityResultCallback<O>))(
contract: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract<I!, O!>,
callback: https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCallback<O!>
)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher<I!>` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
<I, O> [registerForActivityResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract<I,O>,androidx.activity.result.ActivityResultRegistry,androidx.activity.result.ActivityResultCallback<O>))(
contract: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract<I!, O!>,
registry: https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultRegistry,
callback: https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCallback<O!>
)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[registerForContextMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#registerForContextMenu(android.view.View))(view: https://developer.android.com/reference/android/view/View.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[removeOnContextAvailableListener](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#removeOnContextAvailableListener(androidx.activity.contextaware.OnContextAvailableListener))(listener: https://developer.android.com/reference/kotlin/androidx/activity/contextaware/OnContextAvailableListener)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[requestPermissions](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requestPermissions(java.lang.String[],int))(permissions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity` `[requireActivity](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireActivity())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/os/Bundle.html` `[requireArguments](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireArguments())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[requireContext](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireContext())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager` `[requireFragmentManager](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireFragmentManager())()`

**This function is deprecated.**

This has been renamed to `getParentFragmentManager()` to make it clear that you are accessing the FragmentManager that contains this Fragment and not the FragmentManager associated with child Fragments.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` `[requireHost](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireHost())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` `[requireParentFragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireParentFragment())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/view/View.html` `[requireView](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#requireView())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setAllowEnterTransitionOverlap](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setAllowEnterTransitionOverlap(boolean))(allow: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setAllowReturnTransitionOverlap](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setAllowReturnTransitionOverlap(boolean))(allow: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setArguments](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setArguments(android.os.Bundle))(args: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setEnterSharedElementCallback](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setEnterSharedElementCallback(androidx.core.app.SharedElementCallback))(callback: https://developer.android.com/reference/kotlin/androidx/core/app/SharedElementCallback?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setEnterTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setEnterTransition(java.lang.Object))(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setExitSharedElementCallback](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setExitSharedElementCallback(androidx.core.app.SharedElementCallback))(callback: https://developer.android.com/reference/kotlin/androidx/core/app/SharedElementCallback?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setExitTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setExitTransition(java.lang.Object))(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setHasOptionsMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setHasOptionsMenu(boolean))(hasMenu: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**

This method is no longer needed when using a `https://developer.android.com/reference/kotlin/androidx/core/view/MenuProvider` to provide a `https://developer.android.com/reference/android/view/Menu.html` to your activity, which replaces `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateOptionsMenu(android.view.Menu,android.view.MenuInflater)` as the recommended way to provide a consistent, optionally `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle`-aware, and modular way to handle menu creation and item selection.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setInitialSavedState](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setInitialSavedState(androidx.fragment.app.Fragment.SavedState))(state: https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment.SavedState?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setMenuVisibility](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setMenuVisibility(boolean))(menuVisible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setReenterTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setReenterTransition(java.lang.Object))(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setRetainInstance](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setRetainInstance(boolean))(retain: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**

Instead of retaining the Fragment itself, use a non-retained Fragment and keep retained state in a ViewModel attached to that Fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setReturnTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setReturnTransition(java.lang.Object))(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setSharedElementEnterTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setSharedElementEnterTransition(java.lang.Object))(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setSharedElementReturnTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setSharedElementReturnTransition(java.lang.Object))(transition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setTargetFragment](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setTargetFragment(androidx.fragment.app.Fragment,int))(fragment: https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment?, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**

Instead of using a target fragment to pass results, the fragment requesting a result should use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager#setFragmentResultListener(java.lang.String,androidx.lifecycle.LifecycleOwner,androidx.fragment.app.FragmentResultListener)` to register a `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentResultListener` with a `
requestKey` using its `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#getParentFragmentManager()`.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setUserVisibleHint](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#setUserVisibleHint(boolean))(isVisibleToUser: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**

If you are manually calling this method, use `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentTransaction#setMaxLifecycle(androidx.fragment.app.Fragment,androidx.lifecycle.Lifecycle.State)` instead.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[shouldShowRequestPermissionRationale](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#shouldShowRequestPermissionRationale(java.lang.String))(permission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startActivity](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startActivity(android.content.Intent))(intent: https://developer.android.com/reference/android/content/Intent.html)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startActivity](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startActivity(android.content.Intent,android.os.Bundle))(intent: https://developer.android.com/reference/android/content/Intent.html, options: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startActivityForResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startActivityForResult(android.content.Intent,int))(intent: https://developer.android.com/reference/android/content/Intent.html, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startActivityForResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startActivityForResult(android.content.Intent,int,android.os.Bundle))(intent: https://developer.android.com/reference/android/content/Intent.html, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, options: https://developer.android.com/reference/android/os/Bundle.html?)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startIntentSenderForResult](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startIntentSenderForResult(android.content.IntentSender,int,android.content.Intent,int,int,int,android.os.Bundle))(
intent: https://developer.android.com/reference/android/content/IntentSender.html,
requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
fillInIntent: https://developer.android.com/reference/android/content/Intent.html?,
flagsMask: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
flagsValues: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
extraFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
options: https://developer.android.com/reference/android/os/Bundle.html?
)`

**This function is deprecated.**

This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and the prebuilt contracts for common intents available in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts`, provides hooks for testing, and allow receiving results in separate, testable classes independent from your fragment.

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startPostponedEnterTransition](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#startPostponedEnterTransition())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `[toString](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#toString())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[unregisterForContextMenu](https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#unregisterForContextMenu(android.view.View))(view: https://developer.android.com/reference/android/view/View.html)`

**This function is deprecated.** Deprecated in Java
From [androidx.lifecycle.HasDefaultViewModelProviderFactory](https://developer.android.com/reference/kotlin/androidx/lifecycle/HasDefaultViewModelProviderFactory) `https://developer.android.com/reference/kotlin/androidx/lifecycle/viewmodel/CreationExtras!` `[getDefaultViewModelCreationExtras](https://developer.android.com/reference/kotlin/androidx/lifecycle/HasDefaultViewModelProviderFactory#getDefaultViewModelCreationExtras())()`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory!` `[getDefaultViewModelProviderFactory](https://developer.android.com/reference/kotlin/androidx/lifecycle/HasDefaultViewModelProviderFactory#getDefaultViewModelProviderFactory())()`

**This function is deprecated.** Deprecated in Java
From [androidx.lifecycle.LifecycleOwner](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner) `abstract https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle!` `[getLifecycle](https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner#getLifecycle())()`

**This function is deprecated.** Deprecated in Java
From [androidx.savedstate.SavedStateRegistryOwner](https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistryOwner) `abstract https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistry!` `[getSavedStateRegistry](https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateRegistryOwner#getSavedStateRegistry())()`

**This function is deprecated.** Deprecated in Java
From [android.view.View.OnCreateContextMenuListener](https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener.html) `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onCreateContextMenu](https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener.html#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo))(
p: https://developer.android.com/reference/android/view/ContextMenu.html!,
p1: https://developer.android.com/reference/android/view/View.html!,
p2: https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html!
)`

**This function is deprecated.** Deprecated in Java
From [androidx.lifecycle.ViewModelStoreOwner](https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStoreOwner) `abstract https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStore!` `[getViewModelStore](https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStoreOwner#getViewModelStore())()`

**This function is deprecated.** Deprecated in Java

## Constants

### EXTRA_BURN_IN_PROTECTION

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

```
const val EXTRA_BURN_IN_PROTECTION = "com.google.android.wearable.compat.extra.BURN_IN_PROTECTION": String!
```

> [!CAUTION]
> **This property is deprecated.**   
> Deprecated in Java

Property in bundle passed to `AmbientCallback#onEnterAmbient(Bundle)` to indicate whether burn-in protection is required. When this property is set to true, views must be shifted around periodically in ambient mode. To ensure that content isn't shifted off the screen, avoid placing content within 10 pixels of the edge of the screen. Activities should also avoid solid white areas to prevent pixel burn-in. Both of these requirements only apply in ambient mode, and only when this property is set to true.

### EXTRA_LOWBIT_AMBIENT

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

```
const val EXTRA_LOWBIT_AMBIENT = "com.google.android.wearable.compat.extra.LOWBIT_AMBIENT": String!
```

> [!CAUTION]
> **This property is deprecated.**   
> Deprecated in Java

Property in bundle passed to `AmbientCallback#onEnterAmbient(Bundle)` to indicate whether the device has low-bit ambient mode. When this property is set to true, the screen supports fewer bits for each color in ambient mode. In this case, activities should disable anti-aliasing in ambient mode.

### FRAGMENT_TAG

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

```
const val FRAGMENT_TAG = "android.support.wearable.ambient.AmbientMode": String!
```

> [!CAUTION]
> **This property is deprecated.**   
> Deprecated in Java

Fragment tag used by default when adding `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport` to add ambient support to a `https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentActivity`.

## Public constructors

### AmbientModeSupport

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

```
[AmbientModeSupport](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#AmbientModeSupport())()
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Constructor

## Public functions

### attach

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

```
java-static fun <T : FragmentActivity?> [attach](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#attach(T))(activity: T!): AmbientModeSupport.AmbientController!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Attach ambient support to the given activity. Calling this method with an Activity implementing the `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallbackProvider` interface will provide you with an opportunity to react to ambient events such as `onEnterAmbient`. Alternatively, you can call this method with an Activity which does not implement the `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallbackProvider` interface and that will only enable the auto-resume functionality. This is equivalent to providing (@code null} from the `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientCallbackProvider`.

| Parameters |
|---|---|
| `activity: T!` | the activity to attach ambient support to. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController!` | the associated `https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport.AmbientController` which can be used to query the state of ambient mode. |

### dump

```
fun [dump](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#dump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[]))(
    prefix: String!,
    fd: FileDescriptor!,
    writer: PrintWriter!,
    args: Array<String!>!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Print the Fragments's state into the given stream.

| Parameters |
|---|---|
| `prefix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | Text to print at the front of each line. |
| `fd: https://developer.android.com/reference/java/io/FileDescriptor.html!` | The raw file descriptor that the dump is being sent to. |
| `writer: https://developer.android.com/reference/java/io/PrintWriter.html!` | The PrintWriter to which you should dump your state. This will be closed for you after you return. |
| `args: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | additional arguments to the dump request. |

### onAttach

```
@CallSuper
fun [onAttach](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onAttach(android.content.Context))(context: Context!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Called when a fragment is first attached to its context. `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreate(android.os.Bundle)` will be called after this.

### onCreate

```
@CallSuper
fun [onCreate](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onCreate(android.os.Bundle))(savedInstanceState: Bundle!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Called to do initial creation of a fragment. This is called after `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onAttach(android.app.Activity)` and before `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)`.

Note that this can be called while the fragment's activity is still in the process of being created. As such, you can not rely on things like the activity's content view hierarchy being initialized at this point. If you want to do work once the activity itself is created, add a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleObserver` on the activity's Lifecycle, removing it when it receives the `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle.State#CREATED` callback.

Any restored child fragments will be created before the base `Fragment.onCreate` method returns.

| Parameters |
|---|---|
| `savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!` | If the fragment is being re-created from a previous saved state, this is the state. |

### onDestroy

```
@CallSuper
fun [onDestroy](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onDestroy())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Called when the fragment is no longer in use. This is called after `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onStop()` and before `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onDetach()`.

### onDetach

```
@CallSuper
fun [onDetach](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onDetach())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Called when the fragment is no longer attached to its activity. This is called after `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment#onDestroy()`.

### onPause

```
@CallSuper
fun [onPause](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onPause())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Called when the Fragment is no longer resumed. This is generally tied to `https://developer.android.com/reference/android/app/Activity.html#onPause()` of the containing Activity's lifecycle.

### onResume

```
@CallSuper
fun [onResume](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onResume())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Called when the fragment is visible to the user and actively running. This is generally tied to `https://developer.android.com/reference/android/app/Activity.html#onResume()` of the containing Activity's lifecycle.

### onStop

```
@CallSuper
fun [onStop](https://developer.android.com/reference/kotlin/androidx/wear/ambient/AmbientModeSupport#onStop())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Called when the Fragment is no longer started. This is generally tied to `https://developer.android.com/reference/android/app/Activity.html#onStop()` of the containing Activity's lifecycle.