WebView 5 min read

AndroidX Web 1.0.0-alpha01: WebContent, WebContentView and the webkit 1.19 Navigation Changes

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.

web 1.0.0-alpha01
new library, released Nov 4, 2026
3
new types: WebContent, WebContentView, DetachedWebContentView
webkit 1.19.0-alpha01
NavigationState, PageState, captureState, Executor overload

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:

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:

// 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

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.

Comments 0

No comments yet. Be the first to leave one!

Leave a comment