Skip to content Skip to sidebar Skip to footer

Why Only The First Activity's `onDestroy` Is Called, Not Other Activities?

(I searched quite a bit, but there seems no exact answer for this.) Let's say there's an app. We can push a button to start another activity. Like this: Activity1 -> Activity2 -

Solution 1:

Ideally when you force close the App from overview, it kills the entire app process and all the activities are destroyed, and your activity stack root's(which is ActivityA) onDestroy method is called and for other activities the method won't be triggered but the stack itself gets destroyed along with the process. Nothing will be alive once the process is destroyed.


Post a Comment for "Why Only The First Activity's `onDestroy` Is Called, Not Other Activities?"