finds.dev← search

// the find

romainguy/sample-wake-me-up

★ 201 · Kotlin · MIT · updated Nov 2022

Sample app demonstrating interop between Jetpack Compose and the Android UI toolkit, including SurfaceView

A Google I/O 2021 keynote demo app showing how to mix Jetpack Compose with the classic Android View system — Fragments, SurfaceView, and a Filament-rendered 3D sky inside a Compose screen. Useful for Android devs who still have Views/Fragments in their app and need a real example of bridging them with Compose, rather than a greenfield Compose-only project.

The SurfaceView-in-Compose case is a legitimately hard interop problem (surface lifecycle, z-ordering, input dispatch) and this is a working, non-trivial example of it rather than a toy button-in-a-Fragment demo. It comes from Romain Guy, who works on the Android toolkit, so the patterns reflect how the team actually intended this interop to work. The codebase is small enough to read start to finish in an hour, including hand-rolled Matrix/Vector/Ray math for the 3D camera, which makes the Filament integration easy to follow instead of hidden behind a library.

No commits since November 2022, and it pins Filament 1.12.8 — recent Filament/AGP/Compose versions have moved on enough that it may not build cleanly today without manual version bumps. The build itself is fragile: you have to hand-download a Filament release and manually copy the matc binary into the project, with no CI verifying any of this still works. It also demonstrates Fragment-based interop, which is a pattern most modern Compose codebases are actively trying to delete rather than add, so the lessons are somewhat dated for a 2026 app. There are no tests, which is fine for a sample but means nothing catches regressions when you adapt the code into a real project.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →