Uncategorized

Android Lifecycle for two activities

Today, I ran into some problems of not understanding how the lifecycle of two activities. When one activity starts another activity, when does the onPause/Stop/Destroy run in comparison to the onCreate/Start/Resume of the next activity. I put some logging in and here are the results:

ActivityA.onCreate
ActivityA.onStart
ActivityA.onResume
ActivityA.onPause
ActivityB.onCreate
ActivityB.onStart
ActivityB.onResume
ActivityA.onStop

For official docs about this, see: Coordinating Activities

Standard

Leave a comment