Jetpack Articles

Android Fragment Lifecycle and FragmentManager: Transactions, Back Stack, and State Recovery

A deep dive into Fragment transaction async execution, back-stack state recovery, ViewModel lifecycle coordination, commitNow, onSaveInstanceState timing, and common NPE and leak traps.

Inside Android Room: KSP Code Generation, Migrations, and Flow Queries

Walk through Room's KSP-generated DAO code, migration strategy, and Flow reactive queries, from compile-time SQL validation to InvalidationTracker.

Inside Android ViewModel: ViewModelStore Retention and SavedStateHandle Recovery

Trace ViewModel from ViewModelStore retention to SavedStateHandle process recreation, and separate configuration-change survival from process-death recovery.