Android Rust music player with modern features
- Kotlin 49.2%
- Rust 27.5%
- C 21.9%
- CMake 1.3%
- Shell 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .cargo | ||
| android | ||
| native/opus/aarch64-linux-android | ||
| src | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| architecture.md | ||
| build.sh | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
| test_audiopus.rs | ||
| test_collate.rs | ||
| test_lofty.rs | ||
| test_opus.rs | ||
| tests_moosic.rs | ||
| TODO.md | ||
RS Music Player
A fast and modern music player with a Rust core and a beautiful Jetpack Compose UI.
TODO (Ordered from Simple to Complex)
🟢 Easy
- Notification Close Button: Add a stop/close button directly in the Android media notification.
- Marquee Text: Make long track titles/artists smoothly scroll back and forth (marquee) if they don't fit the screen.
- Clear Grouped Queue: Add a button to delete a specific grouped queue entirely (rather than removing all queues/tracks).
- (Low Priority) Quick Settings Tile: Add a tile in Android's quick settings shade for rapid player access.
🟡 Moderate
- Independent Volume Control: Add a dedicated volume slider (0-100%) independent of the system volume (like Namida).
- Bluetooth Auto-Reconnect: Seamlessly reconnect and re-initialize audio streams when Bluetooth headphones connect or disconnect.
- Sleep Timer: Allow setting a timer to automatically pause playback.
- Queue End & Playback Behaviors: Add flexible settings for what happens when a track/queue ends (Loop queue, Stop playback, Remove played tracks from queue).
- Smart Playlists (Rules-based): Auto-updating playlists based on rules like "Added recently" or "Most played".
- Local Statistics & Scrobbling: Built-in listening stats (like Wrapped) and Last.fm/ListenBrainz scrobbling.
- Built-in Tag Editor: Edit track titles, artists, and cover art directly from the app (saving to the file).
- (Low Priority) Android Auto & WearOS: Extend support to cars and smartwatches.
- Dedicated Shared Library Browser: Browse, search and play tracks from connected P2P/LAN shared servers inside the dedicated Shared Library screen instead of polluting local explorer tree.
🟠 Hard
- Lockscreen Player: Full integration with Android's lockscreen via MediaSession.
- Pitch & Speed Control: Add a modal for playback speed and pitch adjustment, with an option to link/unlink their coefficients (requires Rust DSP/resampling).
- Playlists & Library Grouping: Create a dropdown menu for Playlists, and implement grouping by Artists, Genres, etc. (Requires DB schema and UI updates).
- Lyrics (.lrc) Support: Support parsing external
.lrcfiles and embedded lyrics tags, with a synchronized UI view. - Translated & Multi-language Lyrics: Side-by-side synchronized translation support for foreign tracks.
- ReplayGain (Loudness Normalization): Read ReplayGain tags and normalize perceived volume across tracks via Rust DSP.
- Gapless Playback: Perfect, sample-accurate gapless transitions for live and concept albums (Audio pipeline enhancement).
- Crossfade & Silence Trimming: Configurable crossfade blending between tracks and automatic silence removal at the start/end of songs.
- Bluetooth Lag Compensation: Detect audio dropouts or high latency with Bluetooth devices and dynamically adjust buffer sizes to compensate.
- Parametric EQ & Bit-perfect Output: Beyond a simple 5-band EQ—a full parametric equalizer and a bit-perfect output mode bypassing Android's resampler.
- Architecture Refactoring & Code Simplification (High Priority):
- Decompose Monolithic
PlayerViewModel: Split the god-object into separate, focused ViewModels/StateHolders:PlaybackViewModel(Playback controls, queue management, volume, speed/pitch DSP).ExplorerViewModel(File tree generation, folder navigation stack, local directory browsing).SharedLibraryViewModel(mDNS service discovery, remote P2P sync, heartbeat, and remote connection states).
- Lifecycle & Coroutine Hygiene: Eliminate race conditions from multiple uncoordinated
LaunchedEffect(Unit)blocks anddelay(50)polling loops acrossMainActivity,PlayerScreen, andPlayerHolder. - Single Source of Truth: Unify track queries and SQLite database operations through a clean repository layer, preventing stale in-memory state and ghost folders.
- UI Component Extraction & Reuse: Extract universal components (
TrackRow,FolderRow,MediaDropdownMenu,HeaderTopBar) into modular composables instead of duplicating markup and logic across screens.
- Decompose Monolithic
🔴 Very Hard / Architectural
- Giga-Fast Background Parsing: Radically speed up library indexing by initially scanning just filenames/
.nomedia, while parsing rich metadata (tags) in a background thread. - Network/Cloud Streaming Protocols: Support remote playback via:
- WebDAV / WebDAVS
- JellyFin
- SFTP
- Smart Audio Caching: Implement a configurable caching mechanism for frequently played network/cloud tracks.
- UI Plugin System & Customization: Support extreme customization through community UI plugins.
How is this possible in Kotlin/Compose?
- Theme Engine (JSON/DSL): Allow users to load JSON files overriding colors, paddings, typography, and component order (e.g., swapping the position of the slider and buttons).
- Server-Driven UI (SDUI) approach: Build a declarative JSON parser for Compose. A plugin provides a JSON tree (e.g.,
{"type": "Row", "children": [...]}) which Kotlin dynamically maps to native Compose composables. - Embedded Scripting (QuickJS / Lua): For logic-heavy plugins, embed a lightweight JS/Lua engine. The script can react to Rust player events and return updated UI states or formatted strings to the Compose layer.