On November 18, 2026 Jetpack shipped androidx.savedstate 1.6.0-alpha06 and androidx.lifecycle 2.12.0-alpha06 together with a Lifecycle 2.11.1 bug fix. Read in isolation each release note is a line or two, but across the six alphas of each library a pattern shows up: the state-saving machinery is being rebuilt around a small set of shared interfaces. This post walks through those changes in order and says what is worth acting on now. Everything here is alpha, so treat it as a preview, not a migration target. For the Lifecycle 2.11 stable features see Lifecycle 2.11 scoped ViewModels.
1. Provider and Restorer become top-level interfaces
SavedState 1.6.0-alpha02 (Aug 26, 2026) added a top-level SavedStateProvider interface and a top-level SavedStateRestorer interface with restoreState(savedState: SavedState?). SavedStateRegistry gained public constructors and now implements both. The same release deprecated AutoRecreated and runOnNextRecreation in favor of the provider and restorer pair, and Lifecycle 2.12.0-alpha02 carried the same deprecation notice.
The release notes also describe a SavedStateConsumer on SavedStateRegistry: registered providers receive restored state automatically, or immediately on registration if state was already restored. The notes list it in the same alpha02 entry that mentions removing an unreleased SavedStateRegistry.SavedStateConsumer, so check the API docs for where it finally lives before depending on it.
Alpha03 (Sep 9) then allowed a null initial state in the SavedStateRegistry constructor, which matters for tests and for registries you create yourself.
2. SavedStateContainer: one base for three types
SavedState 1.6.0-alpha05 (Oct 21, 2026) introduced SavedStateContainer as the common implementation base for SaveableStateRegistry, SavedStateHandle and SavedStateRegistry. Compose's rememberSaveable backing store, ViewModel's SavedStateHandle and the activity-level registry were three parallel implementations; the container is meant to unify them.
SavedStateRegistrygetsasContainer()andgetOrCreateContainer()to create child containers.- Lifecycle 2.12.0-alpha05 (same day) does the same for
SavedStateHandle:asContainer(),getOrCreateContainer(), andgetOrCreateSavedStateHandle(), which creates a childSavedStateHandleinside the current one.
Child handles are the interesting part. A feature module can own a scoped slice of a screen's saved state without inventing key prefixes to avoid collisions.
Breaking behavior in alpha05: using getStateFlow and getLiveData on the same SavedStateHandle is no longer valid and throws an IllegalArgumentException. If a legacy screen exposes both for the same key, pick one before trying 2.12.
3. A sketch of the provider and restorer pair
The notes only give signatures for restoreState, so the code below is my own illustration of the pattern, using the long-standing SavedStateProvider.saveState() shape. I did not compile it against 1.6.0-alpha06; check the final API before copying.
class DraftStore :
SavedStateRegistry.SavedStateProvider,
SavedStateRestorer {
var draft: String = ""
override fun saveState(): SavedState = savedState { putString("draft", draft) }
override fun restoreState(savedState: SavedState?) {
draft = savedState?.read { getStringOrNull("draft") } ?: ""
}
}
The practical gain of a separate restorer is that restoring is no longer tied to the provider being registered at exactly the right moment, which is where runOnNextRecreation users tended to get bitten.
4. Lifecycle 2.12 smaller changes
- alpha01 (Aug 12): the
lifecycle-compilerannotation processor artifact is deprecated; migrate toDefaultLifecycleObserverorLifecycleEventObserver.SavedStateViewModelFactoryandAbstractSavedStateViewModelFactorynow fail fast when theSavedStateRegistryOwneris not also aViewModelStoreOwner, and system tracing was added toLifecycleRegistryevent dispatches. - alpha03 (Sep 9):
compileSdkfor Compose libraries moved to 37.1, so apps and libraries using Compose must update theircompileSdktransitively. - alpha06 (Nov 18):
LocalLifecycleOwnernow usescompositionLocalWithHostDefaultOfandLifecycleOwnerHostDefaultKey, and is no longer read directly from the view tree outside Android. SavedState 1.6.0-alpha06 makes the matching change forLocalSavedStateRegistryOwnerwithSavedStateRegistryOwnerHostDefaultKey. This is mostly a Compose Multiplatform plumbing change; Android code readingLocalLifecycleOwner.currentis unaffected at the call site. - 2.11.1 (stable, Nov 18):
LifecycleRegistry.currentStateFlownow returns the same instance on every call instead of creating a new one. If you collected it repeatedly in a loop or passed it around, this is a free fix.
5. What to do now
- Upgrade to Lifecycle 2.11.1 if you use
currentStateFlow. It is a stable bug fix. - Search for
@OnLifecycleEventand thelifecycle-compilerdependency; move to the observer interfaces before the artifact goes away. - Search for
AutoRecreatedandrunOnNextRecreationin custom libraries and plan the provider and restorer migration. - Do not ship 2.12 or 1.6 alphas in production. Try them in a branch to see whether child
SavedStateHandlecontainers simplify your feature-scoped state.
Related: Lifecycle 2.11 scoped ViewModels for Compose Pager and Hilt 1.4.0 stable ViewModel factory.
Source: AndroidX release notes for SavedState and Lifecycle on developer.android.com, fetched Nov 26, 2026. The code sample is my own illustration and was not compiled.
No comments yet. Be the first to leave one!