Chromium Embedded Framework on native Android. Video, audio, ad blocking, off-screen rendering. Full browser engine control beyond WebView.
H.264/AAC via hardware MediaCodec. Surface rendering through Chromium's GPU compositor. Background audio with ForegroundService.
Network-level request interception via CefRequestHandler. EasyList (61K+ rules), auto-updated. The ad request never reaches the server.
CEF C API on Android. Custom protocol handlers, off-screen rendering, JavaScript execution, request modification. What WebView can't do.
Surface mode for on-screen with video/audio. OSR mode for headless screenshots, PDF generation, server-side rendering.
Standard Gradle integration. Add the dependency, call initialize(), load a URL. Two variants: full codecs and libre (FOSS only).
Free as in freedom. Full source on Codeberg. Commercial licensing available for projects that need different terms.
| Capability | Cefrium | WebView |
|---|---|---|
| Request interception | CefRequestHandler (full control) | shouldInterceptRequest (limited) |
| Off-screen rendering (pixel buffer) | OnPaint API | No |
| Chromium version control | Pinned (currently 148) | Varies by device |
| Multi-process control | Yes | No |
| Custom protocol handlers | CefSchemeHandlerFactory | Via shouldInterceptRequest |
| Modern CSS (scroll-driven, view transitions) | Always (Latest Chromium) | Depends on device WebView version |
| Download interception | CefDownloadHandler | DownloadListener |
| Context menu customization | CefContextMenuHandler | Limited |
// Surface mode — video, audio, GPU compositing CefriumBrowser browser = CefriumBrowser.createWithSurface(activity); browser.setOnUrlChangedListener(url -> urlBar.setText(url)); browser.setOnTitleChangedListener(title -> setTitle(title)); browser.setOnLoadingStateChangedListener((loading, back, fwd) -> progressBar.setVisibility(loading ? VISIBLE : GONE)); browser.loadUrl("https://example.com"); // OSR mode — headless, screenshots, PDF CefriumBrowser headless = new CefriumBrowser(1080, 1920, density); headless.setRenderHandler((w, h, pixels) -> { /* pixel buffer */ }); headless.loadUrl("https://example.com");
Built by Juan Manuel Mendez Rey — Debian CEF packager (six architectures, 2000+ validation builds). The Android port applies the same engineering rigor to a platform CEF hasn't supported before.