One decision gates half of this list: kwry's Android minSdk
kwry pins androidx.webkit 1.14.0 with android-minSdk = "21" (libs.versions.toml). Later androidx.webkit releases raised their minimum to API 23 and then 24 (release notes). Staying on 21 keeps kwry on 1.14, where async startup and prerender exist only as experimental APIs. Moving to API 24 unlocks the stable navigation listener, isolated-world bridges, preconnect, QUIC hints, navigate and the cross-origin isolation allowlist. Before deciding, check how many installs run Android 5–6 (PostHog app_opened by OS version).
Adopt
| What | Why it matters for us | Where in kwry | Evidence |
|---|---|---|---|
Async WebView startup (WebViewCompat.startUpWebView), plus a CI check that fails if any SDK starts WebView on the UI thread (getUiThreadBlockingStartUpLocations) | cheapest cold-start win; available as experimental on today's 1.14 | before the first WebView is created in KwryView.kt; report blocking locations through the splash release | Android startup guide |
| Warm, already-authenticated WebViews | Shopify's single biggest win came from removing auth redirects and keeping warmed WebViews ready | for Hoichoi: warm the WebView and token during splash; for TV, check the memory budget first | Shopify: P75 from 6 s to 1.4 s |
Prerender the next screen (prerenderUrlAsync), preconnect API, image CDN and licence origins | an instant next screen, paired with the planned native transitions: prerender on press, fly when it's ready | a host config hook in Kwry.kt; prefetch is skipped for HTML that kwry serves itself, so it helps network-served pages and connections | speculative loading guide |
Liquid Glass with real system bars on iOS 26: obscuredContentInsets, backdrop-filter behind a transparent web view | apps using real UIKit bars got the new look with no code; JS-drawn bars didn't | KwryViewController app surface, behind an iOS 26 availability check | Safari 26 features, Masilotti |
| Navigation API and cross-document View Transitions in the Solid app | now in all three engines (Chromium 126 / iOS 18.2 for transitions; iOS 26.2 and WebKitGTK 2.52 for the Navigation API): one router model everywhere | web side; kwry's first-paint gate must not fight the transition | Safari 26.2, WebKitGTK 2.52 |
Allocation and node-count audit on TV (lazy rows, no remapping of API responses into new objects, onCleanup on every listener) | ~200 ms GC hitches and 480+ render nodes in an 8×30 grid are the common causes of slow Solid TV apps | Hoichoi tv-kit, not kwry | SolidTV, 2026-05 |
Steal the idea
Native views placed by DOM rects, with cut-outs (Electrobun)islandsplayerThe page owns layout; native follows the element's rect, and CSS selectors cut holes so web controls show above the native view.
Each <electrobun-webview> reports its getBoundingClientRect on ResizeObserver, on resize, and on a poll that speeds up for 500 ms after any move, because scrolls and transforms don't fire ResizeObserver (overlaySync.ts:40-108). A masks="selector,…" attribute cuts holes for DOM drawn over it (webviewTag.ts:193-221).
This is the missing piece for placing player, cast and map islands inside a web layout.
A generated <kwry-island> element sends {rect, masks} as a latest-mode observation, which already replaces any unsent update.
Native view under a transparent WebView (Capacitor Google Maps)islandsplayerThe reverse layout: native below, web on top, the DOM decides who owns each touch.
The WebView is transparent (CapacitorGoogleMap.kt:104); touches inside the map's bounds are checked against document.elementFromPoint (implementation.ts:222-232).
Hoichoi's player already sits under a transparent WebView. This is how Solid controls stay on top with no rect syncing for each overlay.
Offer both modes per island: above with masks, or below with hit-testing.
File-level and binary-diff OTA, crash-aware rollback (Capgo, hot-updater)otaSmall web changes download kilobytes, and a bad bundle is identified by the OS, not only by a timeout.
A per-file sha256 manifest reuses files already in the APK from a hash list built at compile time (DownloadService.java:503-676). On the next launch, ApplicationExitInfo tells a crash or ANR under the new bundle from a slow boot (AndroidAppExitReporter.java:37). hot-updater ships bsdiff patches (hdiff.ts).
kwry already has signing and the ready rollback, but no delta download and no exit-reason evidence.
Add both to bridge-bundle, keeping kwry's own signatures (Capgo's RSA PKCS#1 v1.5 isn't worth copying).
Pick the bridge path by payload size (Tauri)bridgeSmall payloads go inline, large ones through a fetchable side channel, chosen automatically.
JSON under 8 KiB and raw bytes under 1 KiB go inline; larger payloads are queued and fetched by id. Tauri measured inline as about 2× faster for 8 KiB JSON on WebView2 and about 30% faster for 1 KiB on macOS (channel.rs:34-38).
kwry has both paths (message frames and the data plane) but the contract author picks one.
Measure the cut-over per host with kwry's own bench; Tauri's numbers don't cover Android.
Object handles in the contract (Snap Valdi)contractPass a handle whose methods call back into the owning object, instead of copying data or passing ids by hand.
Valdi separates @ExportModel (copied fields) from @ExportProxy (a handle that routes calls to the owning instance) (docs).
A player session would be an object with methods, not a session-id string threaded through every call.
A future contract feature; check it against kwry's per-document lifetimes.
Start the data fetch in the input handler (Microsoft Teams)bridgeperformanceFire the bridge call from the tap, before the UI framework renders.
Teams cut chat-switch latency by 20% this way, and fixed 6% of macOS freezes by loading the WebView2 library off the main thread (Teams, 2026-06).
The same applies to Hoichoi's detail open: fetch on pointerdown, not after the route mounts.
Web side, alongside the tap-feedback work in PR #465.
Behind the minSdk 24 decision
| API | androidx.webkit | What it gives kwry | Where |
|---|---|---|---|
NavigationListener, Page#getUrl, first-contentful-paint callbacks | 1.16 | a real per-document identity and first-paint timing from the engine, replacing today's heuristics | Documents.kt, Kwry.kt page-started block |
Web message listener in a JavaScriptExecutionWorld | 1.16 | bridge bootstrap the page's own JS can't tamper with (like WebKit's content worlds) | bridge install in Kwry.kt |
saveState (stable) | 1.16 | restore after process death | KwryActivity |
navigate (replace entry) | 1.17 | typed loads for deep links | deep-link handling |
| Cross-origin isolation allowlist | 1.18 | SharedArrayBuffer, if the page also sends the isolation header | Profile setup |
| Back-forward cache settings | 1.15–1.16 | instant Back between documents. Hold until bridge ports and sessions survive being frozen and restored | Kwry.kt port lifecycle |
Apple's equivalents arrive with iOS 27: WKContentWorldConfiguration, mainFrameNavigation and WKJSHandle (Safari 27 features), which plug into the bridge install in AppleWebHost.kt. Windows is already ahead: kwry uses WebView2's shared buffers for zero-copy frames (WebView2Host.kt:333).
Watch
| What | Why not yet |
|---|---|
SwiftUI WebView / WebPage, iOS 26 (WebKit) | iOS 26 minimum. A headless WebPage could prewarm a page without showing it (not tested) |
Expo DOM components' synchronous bridge (DomWebViewBridge.kt) | a blocking call stalls the renderer; kwry's async JSON-RPC is the safer design |
| Wails v3 mobile (wails) | Go on Android and iOS; no mechanism kwry lacks yet |
| Roku RSG SDK: TypeScript on Hermes with Solid-based components (Roku) | beta, sideload only, GA targeted Fall 2027; already in the TV leaf plan |
| Vega OS: React Native 0.83 or Vega WebView, no Android apps (Amazon) | a kwry shell over Vega WebView is a real target for new Fire TVs; the Android build won't run there |
What the industry is learning
Confirms kwry's direction
- Thin native host, signed OTA UI bundle. Prime Video runs its UI as a downloadable bundle shipped roughly daily, and cut input latency on a low-end device from ~247 ms to 33 ms (QCon, InfoQ 2025).
- OTA web bundles are allowed on both stores as long as they don't add native capability or change the app's purpose (OtaKit summary of §3.3.1(B) and Play policy). Keep the contract fixed in the binary.
- TV is splitting by runtime (Vega on RN or WebView, Roku on TypeScript and SceneGraph, YouTube on a trimmed Chromium). Shared logic plus a renderer per platform is the common answer, which is kwry's contract-first shape.
Warnings
- No platform gives WebViews a frame-rate fix. Nothing in androidx.webkit 1.15–1.19 touches compositing (release notes). Smooth apps use native transitions around web content and compositor-only CSS inside it.
- Android 17 enforces per-app memory caps, and a leaked WebView is a fast way to hit them (Stora summary). Log exit reasons and soak-test the lowest-RAM devices.
- iOS WebView QA is the agent bottleneck. Android WebViews can be driven over DevTools (25 screens in ~90 s); iOS took six hours of coordinate taps (Meiklejohn, 2026-03). A test hook in kwry's bridge would close that gap.
- Big apps are leaving JS UI runtimes (Discord moving to Rust plus native UI, Widerplay). kwry's pitch is native islands, not "web everywhere".
Suggested order
1 · Decide minSdk
Pull Android 5–6 install share from PostHog. If it's negligible, move kwry to API 24 and androidx.webkit 1.18.
Unlocks most of the Android list.2 · Cold start
startUpWebView, the CI check for UI-thread WebView startup, warm WebView plus token during splash, preconnect to API, CDN and licence origins.
3 · Island placement
<kwry-island> with rect sync and masks, plus the native-below mode with DOM hit-testing.
4 · OTA
File-level delta manifest and exit-reason-aware rollback in bridge-bundle.
5 · Navigation
Add shared-realm native screens as a candidate in the motion spike; prerender the likely next route.
Feeds the motion plan.6 · Test hook
A bridge-level hook so agents and CI can drive iOS WebViews by element, not coordinates.
Makes iOS QA as fast as Android's.How this was researched method
Open-source projects (GitHub API for stars and activity, code read for the top seven, repos cloned to ~/Tools), engineering blogs and talks from 2025–2026 (only sources that opened were kept; three that failed were dropped), and platform release notes from Android, WebKit, Microsoft and WebKitGTK.
kwry's androidx.webkit and minSdk pins, its existing WebView2 shared-buffer use, and that it has no prerender, startup or exit-reason code yet. Every source URL on this page returned HTTP 200. Shopify's 6 s → 1.4 s figure and Tauri's thresholds were read from the source.
Third-party performance claims (SolidTV's renderer gain, Amazon's reuse percentages) are the authors' own. The minSdk effect is inferred from the release notes, not built.