Five architectural changes: 1. PTS-driven clock: VideoFrameMetadataListener on ExoPlayer delivers the exact presentation timestamp of each video frame. LibassRenderThread drives rendering at that PTS rather than polling currentPosition. 2. Translucent SurfaceView: NativeLibassSubtitleView becomes a SurfaceView with PixelFormat.TRANSLUCENT and setZOrderMediaOverlay(true). Its surface is composited by the hardware layer between the video surface and the Compose window, with zero main-thread involvement during playback. 3. Single HandlerThread ownership: LibassRenderThread owns the renderer handle. All operations (render, addEvent, clearEvents, surface lifecycle, teardown) are Handler messages to this thread. The ReentrantLock is gone — no contention because there is no sharing. 4. ALPHA_8 glyph patches via lockHardwareCanvas: nativeRenderImages returns the ASS_Image list as flat int/byte arrays instead of blending into a full ARGB frame. Kotlin draws each glyph as a tiny ALPHA_8 bitmap on the hardware canvas with a tinted Paint. Glyph bitmaps are cached by libass bitmap pointer, so a static or moving subtitle re-draws cached textures at new positions and uploads nothing. 5. detect_change gating: nativeRenderImages returns -1 when detect_change == 0. Kotlin skips lockHardwareCanvas entirely — zero work when the frame is unchanged. Paused playback is fully idle. LibassEventRelay routes setHeader, addEvent, clearEvents through the thread. relay.activeRenderer remains a StateFlow<NativeLibassRenderer?> for the existing PlayerPlaybackSurface observer. Tests updated to drain the HandlerThread between async relay operations and direct render() calls. |
||
|---|---|---|
| .github/workflows | ||
| app | ||
| build-logic | ||
| core | ||
| data | ||
| gradle | ||
| player | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle.kts | ||
Fluxa
A fast, native media client for Android phones, tablets, and TV.
Browse catalogs, track what you watch, and play anything the Stremio addon ecosystem exposes.
What it does
Fluxa connects to any Stremio-compatible addon and turns it into a proper Android app: a home feed with genre and category browsing, a calendar of upcoming episodes, a library with continue-watching and resume positions, and two-way watch tracking with Trakt, MyAnimeList, and Simkl. Playback runs through Media3/ExoPlayer and MPV, including direct torrent/magnet support, with no telemetry.
The Android shell handles all platform I/O — HTTP, Room, ExoPlayer, audio, notifications — but the actual decision-making lives in fluxa-core, a headless Rust library that runs the same logic across Android and desktop targets. Rust never touches the network directly; it emits typed effects that the Kotlin layer fulfills.
Features
- Catalogs & discovery — home feed, genre/category grids, search across every installed addon, and a calendar of upcoming episodes for what you're following
- Library — watchlist, continue watching with resume position, and custom collections, with import support for existing lists
- Watch tracking — two-way sync with Trakt, MyAnimeList, and Simkl
- Playback — subtitle and audio track selection, intro/outro/recap skip, and direct torrent/magnet support
- Profiles — multiple local profiles on one install, each with its own library, addons, and sync accounts
- Addons — install and manage Stremio-compatible addons directly from the app
- TV-ready — a dedicated Android TV / Google TV interface, not a stretched phone layout
- Auto-update — checks for and installs new versions in-app
Download
Grab the latest build from Releases. Requires Android 8.0+ (API 26).
| Variant | Package | Target |
|---|---|---|
mobile |
com.fluxa.app.mobile |
Phone & tablet |
tv |
com.fluxa.app.tv |
Android TV / Google TV |
Each variant ships per-ABI APKs — pick the one matching your device, or let the in-app updater do it for you:
| ABI | Devices |
|---|---|
arm64-v8a |
Most phones/tablets/TVs from the last ~6 years |
armeabi-v7a |
Older 32-bit ARM devices |
x86 |
Intel-based Android (emulators, some set-top boxes) |
Building from source
git clone https://github.com/KhooLy/Fluxa.git
cd Fluxa
./gradlew :app:assembleMobileDebug
# or for TV
./gradlew :app:assembleTvDebug
Prerequisites
- JDK 17+
- Rust stable with the Android NDK targets (
aarch64-linux-android,armv7-linux-androideabi,i686-linux-android) - Android NDK (version pinned in
app/build.gradle.kts) fluxa-corechecked out as a sibling directory (../fluxa-core) — it also providesfluxa-streaming-engine(../fluxa-streaming-engine)
The Rust libraries (fluxa_core, fluxa_streaming_engine) are cross-compiled for all Android ABIs automatically as part of the Gradle build; no manual cargo build step is needed.
Architecture
Fluxa is split into two native Rust libraries and an Android Kotlin shell:
┌─────────────────────────────────────────────────────────┐
│ Android (Kotlin + Compose) │
│ UI · ViewModel · Repository · OkHttp · Room · Player │
├───────────────────────────┬─────────────────────────────┤
│ fluxa_core │ fluxa_streaming_engine │
│ Headless brain: state, │ Video proxy, Dolby Vision │
│ policy, stream planning │ rewrite, torrent engine │
└───────────────────────────┴─────────────────────────────┘
Rust never calls the network directly. Instead it emits typed effects that Kotlin executes:
Kotlin → dispatch(action)
← { state, effects: [{ id, type, payload }] }
Kotlin → executes each effect (OkHttp / Room / audio / ...)
→ completeEffect({ effectId, result })
← { state, effects: [...] }
This keeps fluxa_core fully portable — the same crate compiles for Android (JNI), desktop (native Rust), and future targets without any platform-specific code inside Rust.
Stack
Kotlin · Jetpack Compose · Rust · AndroidX Media3 / ExoPlayer · MPV · librqbit · UniFFI · Hilt · Room · OkHttp + Retrofit · Coil
Legal — Fluxa is a client-side interface for user-installed Stremio addons. It does not host, serve, or distribute any media content. All streams come from third-party addons chosen by the user. Fluxa is not affiliated with any addon developer, repository, or content provider. Users are responsible for ensuring they have the right to access what they stream.
Related projects
- Fluxa Desktop — the desktop counterpart to this app
- fluxa-core — the shared Rust library powering both