Added in API level 14

Application.ActivityLifecycleCallbacks


public static interface Application.ActivityLifecycleCallbacks

android.app.Application.ActivityLifecycleCallbacks


Summary

Public methods

abstract void onActivityCreated(Activity activity, Bundle savedInstanceState)

Called when the Activity calls super.onCreate().

abstract void onActivityDestroyed(Activity activity)

Called when the Activity calls super.onDestroy().

abstract void onActivityPaused(Activity activity)

Called when the Activity calls super.onPause().

default void onActivityPostCreated(Activity activity, Bundle savedInstanceState)

Called as the last step of the Activity being created.

default void onActivityPostDestroyed(Activity activity)

Called as the last step of the Activity being destroyed.

default void onActivityPostPaused(Activity activity)

Called as the last step of the Activity being paused.

default void onActivityPostResumed(Activity activity)

Called as the last step of the Activity being resumed.

default void onActivityPostSaveInstanceState(Activity activity, Bundle outState)

Called as the last step of the Activity saving its instance state.

default void onActivityPostStarted(Activity activity)

Called as the last step of the Activity being started.

default void onActivityPostStopped(Activity activity)

Called as the last step of the Activity being stopped.

default void onActivityPreCreated(Activity activity, Bundle savedInstanceState)

Called as the first step of the Activity being created.

default void onActivityPreDestroyed(Activity activity)

Called as the first step of the Activity being destroyed.

default void onActivityPrePaused(Activity activity)

Called as the first step of the Activity being paused.

default void onActivityPreResumed(Activity activity)

Called as the first step of the Activity being resumed.

default void onActivityPreSaveInstanceState(Activity activity, Bundle outState)

Called as the first step of the Activity saving its instance state.

default void onActivityPreStarted(Activity activity)

Called as the first step of the Activity being started.

default void onActivityPreStopped(Activity activity)

Called as the first step of the Activity being stopped.

abstract void onActivityResumed(Activity activity)

Called when the Activity calls super.onResume().

abstract void onActivitySaveInstanceState(Activity activity, Bundle outState)

Called when the Activity calls super.onSaveInstanceState().

abstract void onActivityStarted(Activity activity)

Called when the Activity calls super.onStart().

abstract void onActivityStopped(Activity activity)

Called when the Activity calls super.onStop().

Public methods

onActivityCreated

Added in API level 14
public abstract void onActivityCreated (Activity activity, 
                Bundle savedInstanceState)

Called when the Activity calls super.onCreate().

Parameters
activity Activity: This value cannot be null.

savedInstanceState Bundle: This value may be null.

onActivityDestroyed

Added in API level 14
public abstract void onActivityDestroyed (Activity activity)

Called when the Activity calls super.onDestroy().

Parameters
activity Activity: This value cannot be null.

onActivityPaused

Added in API level 14
public abstract void onActivityPaused (Activity activity)

Called when the Activity calls super.onPause().

Parameters
activity Activity: This value cannot be null.

onActivityPostCreated

Added in API level 29
public void onActivityPostCreated (Activity activity, 
                Bundle savedInstanceState)

Called as the last step of the Activity being created. This is always called after Activity#onCreate.

Parameters
activity Activity: This value cannot be null.

savedInstanceState Bundle: This value may be null.

onActivityPostDestroyed

Added in API level 29
public void onActivityPostDestroyed (Activity activity)

Called as the last step of the Activity being destroyed. This is always called after Activity#onDestroy.

Parameters
activity Activity: This value cannot be null.

onActivityPostPaused

Added in API level 29
public void onActivityPostPaused (Activity activity)

Called as the last step of the Activity being paused. This is always called after Activity#onPause.

Parameters
activity Activity: This value cannot be null.

onActivityPostResumed

Added in API level 29
public void onActivityPostResumed (Activity activity)

Called as the last step of the Activity being resumed. This is always called after Activity#onResume and Activity#onPostResume.

Parameters
activity Activity: This value cannot be null.

onActivityPostSaveInstanceState

Added in API level 29
public void onActivityPostSaveInstanceState (Activity activity, 
                Bundle outState)

Called as the last step of the Activity saving its instance state. This is always called afterActivity#onSaveInstanceState.

Parameters
activity Activity: This value cannot be null.

outState Bundle: This value cannot be null.

onActivityPostStarted

Added in API level 29
public void onActivityPostStarted (Activity activity)

Called as the last step of the Activity being started. This is always called after Activity#onStart.

Parameters
activity Activity: This value cannot be null.

onActivityPostStopped

Added in API level 29
public void onActivityPostStopped (Activity activity)

Called as the last step of the Activity being stopped. This is always called after Activity#onStop.

Parameters
activity Activity: This value cannot be null.

onActivityPreCreated

Added in API level 29
public void onActivityPreCreated (Activity activity, 
                Bundle savedInstanceState)

Called as the first step of the Activity being created. This is always called before Activity#onCreate.

Parameters
activity Activity: This value cannot be null.

savedInstanceState Bundle: This value may be null.

onActivityPreDestroyed

Added in API level 29
public void onActivityPreDestroyed (Activity activity)

Called as the first step of the Activity being destroyed. This is always called before Activity#onDestroy.

Parameters
activity Activity: This value cannot be null.

onActivityPrePaused

Added in API level 29
public void onActivityPrePaused (Activity activity)

Called as the first step of the Activity being paused. This is always called before Activity#onPause.

Parameters
activity Activity: This value cannot be null.

onActivityPreResumed

Added in API level 29
public void onActivityPreResumed (Activity activity)

Called as the first step of the Activity being resumed. This is always called before Activity#onResume.

Parameters
activity Activity: This value cannot be null.

onActivityPreSaveInstanceState

Added in API level 29
public void onActivityPreSaveInstanceState (Activity activity, 
                Bundle outState)

Called as the first step of the Activity saving its instance state. This is always called before Activity#onSaveInstanceState.

Parameters
activity Activity: This value cannot be null.

outState Bundle: This value cannot be null.

onActivityPreStarted

Added in API level 29
public void onActivityPreStarted (Activity activity)

Called as the first step of the Activity being started. This is always called before Activity#onStart.

Parameters
activity Activity: This value cannot be null.

onActivityPreStopped

Added in API level 29
public void onActivityPreStopped (Activity activity)

Called as the first step of the Activity being stopped. This is always called before Activity#onStop.

Parameters
activity Activity: This value cannot be null.

onActivityResumed

Added in API level 14
public abstract void onActivityResumed (Activity activity)

Called when the Activity calls super.onResume().

Parameters
activity Activity: This value cannot be null.

onActivitySaveInstanceState

Added in API level 14
public abstract void onActivitySaveInstanceState (Activity activity, 
                Bundle outState)

Called when the Activity calls super.onSaveInstanceState().

Parameters
activity Activity: This value cannot be null.

outState Bundle: This value cannot be null.

onActivityStarted

Added in API level 14
public abstract void onActivityStarted (Activity activity)

Called when the Activity calls super.onStart().

Parameters
activity Activity: This value cannot be null.

onActivityStopped

Added in API level 14
public abstract void onActivityStopped (Activity activity)

Called when the Activity calls super.onStop().

Parameters
activity Activity: This value cannot be null.