Day 3/100: Activity Lifecycle β The Diagram You've Seen 100 Times
This is Day 3 of my 100 Days to Senior Android Engineer series. Each post: what I thought I knew β what I actually learned β interview implications. π The concept Every Android developer has seen ...

Source: DEV Community
This is Day 3 of my 100 Days to Senior Android Engineer series. Each post: what I thought I knew β what I actually learned β interview implications. π The concept Every Android developer has seen this diagram: onCreate() β onStart() β onResume() ββββββββββββββββββββββββ β β [Activity running] β β β onPause() β β onRestart() onStop() βββββββββββββββββββββββ β β onDestroy() You could draw this in your sleep. I certainly could. The problem is that this diagram shows the happy path. It doesn't show what happens in the three scenarios that actually matter in production β and that every senior interview will eventually probe. π‘ What I thought I knew My mental model was: callbacks fire in a predictable sequence, each one is the right place to do certain things (init in onCreate, release in onDestroy), and as long as I follow the pattern, everything works. That model is mostly right. Mostly. π³ What I actually learned The diagram has a ghost: the back stack The standard diagram shows a singl