Interview frequency: …
Short answer
AppLifecycleListener tracks states such as resumed, inactive, hidden, paused, and detached, with transitions that differ by platform.
Explanation
Use the lifecycle to pause temporary work or save state when the app goes to the background, but do not assume every platform sends the same sequence or that a single callback guarantees the save completes. Tie the listener to the screen's or app's lifetime and clean it up when done.
Common mistakes
- Treating paused as the only important state.
- Leaving a listener running after dispose, or relying on a single callback to save critical data.