Notes

Android Activity Lifecycle

Daniel Weibel
Created 14 Oct 2016
Last updated 31 Oct 2017

Activity Lifecycle Summary

Link to Android documentation.

Callback Sequence

onCreate > onStart > onResume > onPause > onStop > onDestroy

Active Lifeteime

Active > onPause > Paused > onResume > Active

The Paused state is triggered when the activity gets partially obscured, for example, by a dialog.

Visible Lifetime

Active > onPause > onStop > Stopped > onRestart > onStart > onResume > Active

The Stopped state is triggered when the user navigates away of this activity, that is, the activity is no longer visible.

Visual Representation

Activity Lifecycle 1

Visual Representation Including Fragment Callbacks

Activity Lifecycle 2