On Nov 4, 2026 AndroidX published a brand new library, androidx.web:web:1.0.0-alpha01, and the same day androidx.webkit:webkit:1.19.0-alpha01. The Web release is small, three API entries, but it targets a problem every Android developer who embeds a WebView knows: the web engine state dies with the view, and the view dies with the Activity.
Scope note: the Web release notes list only three one-line API entries and give no sample code. The Kotlin below is a sketch of how I would wire those types together; constructor and method names beyond the three type names are my assumptions, not documented API. Check the reference before copying.
1. What androidx.web adds
The release notes describe three new types, all introduced in one change:
WebContent: an API to hold a persistent web engine session state that can safely outlive individual UI views or Activities.WebContentView: a new specializedWebViewdesigned to integrate withWebContent.DetachedWebContentView: a specializedWebContentViewthatWebContentattaches to when it is not attached to an Activity.
Read together, the design is: your page, its session and its history live in WebContent; a WebContentView is just a window onto it; and when no Activity is showing it, the content parks itself in a detached view instead of being torn down. That is a different ownership model from a plain WebView, which is both the renderer host and the screen widget.
2. Why this matters in practice
Today, surviving a configuration change or a navigation away from a hybrid screen means one of the usual workarounds: handle configChanges yourself, keep a WebView in a singleton and re-parent it, or save and restore state with saveState() and lose scroll, media or JS state. A first-party type for session state that outlives the view is aimed squarely at those hacks.
// Sketch only: WebContent/WebContentView are real types, the wiring is assumed.
class BrowserViewModel : ViewModel() {
// Owned by the ViewModel so it survives rotation and back-stack changes.
val content: WebContent = createWebContent()
}
class BrowserActivity : ComponentActivity() {
private val vm: BrowserViewModel by viewModels()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Attach the long-lived content to a view for this Activity instance.
val view = WebContentView(this)
setContentView(view)
attach(vm.content, view)
}
}
Because this is alpha01 and a brand new artifact, expect names and lifecycle rules to move. Do not put it on a production screen yet; prototype it on one internal browser or login flow and file feedback on the issue tracker component linked from the release page.
3. WebKit 1.19.0-alpha01
The companion webkit alpha is API-only and mostly tightens the Navigation and Page listener surface that arrived in the 1.1x line:
- Immutable snapshots: new
NavigationStateandPageStateclasses are immutable copies ofNavigationandPageat a point in time, passed to newNavigationListenercallbacks in place of the live objects. - Rename:
Navigation/Page#snapshotStatebecame#captureState. The notes are inconsistent about the old name in one sentence, so verify against the reference. - New getters:
NavigationState#getNavigationStartUptimeMillis, and response headers exposed throughonNavigationRedirect(NavigationState, NavigationRedirectParameters). - Hidden callback fixed: a
NavigationListenercallback that was accidentally hidden is now visible. - Startup on your executor:
WebViewCompat#startUpWebViewgains an overload taking anExecutorfor theWebViewOutcomeReceivercallback, so completion can be handled off the main looper. - QUIC hints:
Profile#addQuicHintsaccepts wildcard URLs such ashttps://*.example.com.
// Overload described in the 1.19.0-alpha01 notes: callback runs on your Executor.
val executor = Executors.newSingleThreadExecutor()
WebViewCompat.startUpWebView(applicationContext, executor, receiver)
The parameter order in the startUpWebView sketch is assumed. The release notes only say an overload accepting an Executor was added.
4. A deprecation to act on now
WebSettingsCompat.getAttributionRegistrationBehavior, setAttributionRegistrationBehavior and the related constants are deprecated. The notes state that WebView no longer supports Attribution Reporting in version 152 and later. If your ad or measurement stack relied on that setting, plan an alternative rather than waiting for a removal.
Adoption checklist
- Treat
androidx.webas an experiment: alpha01, three types, no samples yet. - Inventory your current WebView survival hacks (singleton, configChanges, saveState) to know what
WebContentcould replace. - If you use the webkit navigation listeners, plan the move to
NavigationState/PageStateandcaptureStatebefore bumping to 1.19. - Remove uses of the deprecated attribution-registration settings.
Sources: the AndroidX Web and WebKit release notes pages (developer.android.com/jetpack/androidx/releases/web and .../releases/webkit) and the AndroidX all-channel release list, retrieved Nov 10, 2026.
No comments yet. Be the first to leave one!