Skip to content

About

A fully offline, modern, modularized music player app built with Kotlin and Jetpack Compose. This project demonstrates clean architecture, feature-based modularization, and modern Android development best practices.

Topics

Resources

Stars

10 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

332 Commits

Folders and files

Repository files navigation

F-Player - Modern Offline Media Player

Android Kotlin Jetpack Compose Hilt Media3 Clean Architecture


Test APK

A test APK is available for download via the GitHub Releases section. πŸ‘‰ You can find the latest build under Releases on this repository to try out the app without building it locally.

F-Player is a modern, modularized media player built with Kotlin and Jetpack Compose, focused on local audio and video playback with a polished offline-first experience.

Designed with Clean Architecture principles, it features a robust playback engine powered by Media3 (ExoPlayer), Google Cast support for both audio and video, seamless modular navigation, and advanced features like audio trimming and tag editing. This project serves as a showcase for modern Android development best practices.


Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4

Screenshot 5 Screenshot 6 Screenshot 7 Screenshot 11

Screenshot 9 Screenshot 8 Screenshot 12 Screenshot 10

Project Overview

F-Player is an offline-first media player focused on a clean, modular architecture. It showcases:

  • Feature-first modularization (each feature lives in its own Gradle module).
  • Clean Architecture (data, domain, presentation layers per feature).
  • Modern Android libraries: Jetpack Compose, Hilt, Media3 (ExoPlayer successor), Room, DataStore, KSP.
  • Offline audio and video scanning/playback with Media3 + local metadata handling.
  • Google Cast playback for local audio files and video files, including receiver artwork/metadata support.
  • External playback entry points for opening supported local or streamed media from other apps.

Modules

The project uses Gradle modularization. Key modules included in settings.gradle.kts:

rootProject.name = "MusicPlayer"
include(":app")
include(":core")

// Feature modules are organized under the 'features' directory
include(":features:library")
include(":features:player")
include(":features:playlist")
include(":features:settings")
include(":features:trim")
include(":features:edit")
include(":features:video")

Key Dependencies

The project uses a centralized version catalog. Selected versions used in the project:

  • Kotlin
  • Android Gradle Plugin (AGP)
  • Jetpack Compose BOM
  • Hilt
  • Media3
  • Room
  • Coroutines
  • Coil
  • Google Cast SDK
  • KSP
  • accompanist-systemuicontroller

Refer to the libs.versions.toml for the full catalog.


Architecture Decisions

Clean Architecture (feature-first)

  • Each feature module (:features:player, :features:library, etc.) contains data, domain, and presentation packages to enforce separation of concerns.
  • core module holds cross-cutting concerns (DI setup, common models, utilities, theme, and UI components).

Dependency Injection

  • Hilt is used for DI across modules. Modules expose bindings through interfaces and rely on @Module + @InstallIn in core/feature modules.

Media Playback

  • Media3 (the modern successor to ExoPlayer) is used for playback and session management.
  • Audio playback logic lives primarily in the :features:player module.
  • Video playback is separated into the :features:video module, keeping video library, player screen, and video playback state isolated from the audio player.

Casting

  • Google Cast support allows audio files and video files to be sent to Cast receivers such as Android TV.
  • Audio casting includes queue playback, receiver metadata, album artwork, and default artwork fallback when a track has no embedded album art.
  • Video casting supports local and externally opened video media, with receiver metadata/artwork handling kept separate from the local player UI.

Persistence & Settings

  • Room stores user playlists and cached metadata.
  • DataStore (preferences) stores persistent settings (theme, playback preferences).

Build & Compiler Tooling

  • KSP is used for code generation where needed (e.g., Room, other annotation processors) β€” ensure KSP version is compatible with the Kotlin version.

Folder Layout (feature-first example)

app/
core/
 β”œβ”€ di/
 β”œβ”€ ui/
 └─ utils/
features/
 β”œβ”€ library/
 β”‚   β”œβ”€ data/
 β”‚   β”œβ”€ domain/
 β”‚   └─ presentation/
 β”œβ”€ player/
 β”‚   β”œβ”€ data/
 β”‚   β”œβ”€ domain/
 β”‚   └─ presentation/
 β”œβ”€ playlist/
 β”œβ”€ settings/
 β”œβ”€ video/
 β”œβ”€ edit/
 └─ trim/

Each feature follows the same data/domain/presentation pattern. Keeping public interfaces in domain and implementation details in data.

About

A fully offline, modern, modularized music player app built with Kotlin and Jetpack Compose. This project demonstrates clean architecture, feature-based modularization, and modern Android development best practices.

Topics

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages