Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# Application.ActivityLifecycleCallbacks

*** ** * ** ***

` public static interface Application.ActivityLifecycleCallbacks `   
` `

|---|
| android.app.Application.ActivityLifecycleCallbacks |

<br />

*** ** * ** ***

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityCreated(android.app.Activity,%20android.os.Bundle)(https://developer.android.com/reference/android/app/Activity activity, https://developer.android.com/reference/android/os/Bundle savedInstanceState) ` Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)`. |
| ` abstract void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityDestroyed(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onDestroy()`. |
| ` abstract void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPaused(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onPause()`. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPostCreated(android.app.Activity,%20android.os.Bundle)(https://developer.android.com/reference/android/app/Activity activity, https://developer.android.com/reference/android/os/Bundle savedInstanceState) ` Called as the last step of the Activity being created. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPostDestroyed(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called as the last step of the Activity being destroyed. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPostPaused(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called as the last step of the Activity being paused. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPostResumed(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called as the last step of the Activity being resumed. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPostSaveInstanceState(android.app.Activity,%20android.os.Bundle)(https://developer.android.com/reference/android/app/Activity activity, https://developer.android.com/reference/android/os/Bundle outState) ` Called as the last step of the Activity saving its instance state. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPostStarted(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called as the last step of the Activity being started. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPostStopped(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called as the last step of the Activity being stopped. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPreCreated(android.app.Activity,%20android.os.Bundle)(https://developer.android.com/reference/android/app/Activity activity, https://developer.android.com/reference/android/os/Bundle savedInstanceState) ` Called as the first step of the Activity being created. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPreDestroyed(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called as the first step of the Activity being destroyed. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPrePaused(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called as the first step of the Activity being paused. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPreResumed(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called as the first step of the Activity being resumed. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPreSaveInstanceState(android.app.Activity,%20android.os.Bundle)(https://developer.android.com/reference/android/app/Activity activity, https://developer.android.com/reference/android/os/Bundle outState) ` Called as the first step of the Activity saving its instance state. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPreStarted(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called as the first step of the Activity being started. |
| ` default void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPreStopped(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called as the first step of the Activity being stopped. |
| ` abstract void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityResumed(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onResume()`. |
| ` abstract void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivitySaveInstanceState(android.app.Activity,%20android.os.Bundle)(https://developer.android.com/reference/android/app/Activity activity, https://developer.android.com/reference/android/os/Bundle outState) ` Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onSaveInstanceState(android.os.Bundle)`. |
| ` abstract void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityStarted(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onStart()`. |
| ` abstract void` | ` https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityStopped(android.app.Activity)(https://developer.android.com/reference/android/app/Activity activity) ` Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onStop()`. |

## Public methods

### onActivityCreated

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onActivityCreated (Activity activity, 
                Bundle savedInstanceState)
```

Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |
| `savedInstanceState` | `Bundle`: This value may be `null`. <br /> |

### onActivityDestroyed

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onActivityDestroyed (Activity activity)
```

Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onDestroy()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPaused

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onActivityPaused (Activity activity)
```

Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onPause()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPostCreated

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPostCreated (Activity activity, 
                Bundle savedInstanceState)
```

Called as the last step of the Activity being created. This is always called after `https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |
| `savedInstanceState` | `Bundle`: This value may be `null`. <br /> |

### onActivityPostDestroyed

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPostDestroyed (Activity activity)
```

Called as the last step of the Activity being destroyed. This is always called after `https://developer.android.com/reference/android/app/Activity#onDestroy()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPostPaused

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPostPaused (Activity activity)
```

Called as the last step of the Activity being paused. This is always called after `https://developer.android.com/reference/android/app/Activity#onPause()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPostResumed

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPostResumed (Activity activity)
```

Called as the last step of the Activity being resumed. This is always called after `https://developer.android.com/reference/android/app/Activity#onResume()` and `https://developer.android.com/reference/android/app/Activity#onPostResume()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPostSaveInstanceState

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPostSaveInstanceState (Activity activity, 
                Bundle outState)
```

Called as the last step of the Activity saving its instance state. This is always called after`https://developer.android.com/reference/android/app/Activity#onSaveInstanceState(android.os.Bundle)`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |
| `outState` | `Bundle`: This value cannot be `null`. <br /> |

### onActivityPostStarted

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPostStarted (Activity activity)
```

Called as the last step of the Activity being started. This is always called after `https://developer.android.com/reference/android/app/Activity#onStart()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPostStopped

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPostStopped (Activity activity)
```

Called as the last step of the Activity being stopped. This is always called after `https://developer.android.com/reference/android/app/Activity#onStop()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPreCreated

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPreCreated (Activity activity, 
                Bundle savedInstanceState)
```

Called as the first step of the Activity being created. This is always called before `https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |
| `savedInstanceState` | `Bundle`: This value may be `null`. <br /> |

### onActivityPreDestroyed

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPreDestroyed (Activity activity)
```

Called as the first step of the Activity being destroyed. This is always called before `https://developer.android.com/reference/android/app/Activity#onDestroy()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPrePaused

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPrePaused (Activity activity)
```

Called as the first step of the Activity being paused. This is always called before `https://developer.android.com/reference/android/app/Activity#onPause()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPreResumed

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPreResumed (Activity activity)
```

Called as the first step of the Activity being resumed. This is always called before `https://developer.android.com/reference/android/app/Activity#onResume()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPreSaveInstanceState

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPreSaveInstanceState (Activity activity, 
                Bundle outState)
```

Called as the first step of the Activity saving its instance state. This is always called before `https://developer.android.com/reference/android/app/Activity#onSaveInstanceState(android.os.Bundle)`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |
| `outState` | `Bundle`: This value cannot be `null`. <br /> |

### onActivityPreStarted

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPreStarted (Activity activity)
```

Called as the first step of the Activity being started. This is always called before `https://developer.android.com/reference/android/app/Activity#onStart()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityPreStopped

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onActivityPreStopped (Activity activity)
```

Called as the first step of the Activity being stopped. This is always called before `https://developer.android.com/reference/android/app/Activity#onStop()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityResumed

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onActivityResumed (Activity activity)
```

Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onResume()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivitySaveInstanceState

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onActivitySaveInstanceState (Activity activity, 
                Bundle outState)
```

Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onSaveInstanceState(android.os.Bundle)`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |
| `outState` | `Bundle`: This value cannot be `null`. <br /> |

### onActivityStarted

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onActivityStarted (Activity activity)
```

Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onStart()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |

### onActivityStopped

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onActivityStopped (Activity activity)
```

Called when the Activity calls `https://developer.android.com/reference/android/app/Activity#onStop()`.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: This value cannot be `null`. <br /> |