MusicX is a music player app made using Jetpack Compose and follows Material 3 guidelines

Overview

MusicX

MusicX is a music player app made using Jetpack Compose and follows Material 3 guidelines.

Application Install

You can Install and test latest MusicX app from below πŸ‘‡

MusicX

Setup

  • Clone the repository on your machine.
  • Create project in Firebase, enable firestore, set rules to public and download google-services.json and paste in the app folder.
  • Add all your songs in Firestore.
  • Add your AudD api key and base url in Secrets.kt
      const val API_KEY = ""  //add your AudD api key here
      const val BASE_URL = "" //add your AudD base url here
  • I have create a sample music list which i uploaded on Firebase, you can use it , all you need to do is to download the mp3 and upload it on any cloud storage and add the url in the objects in MusicList.kt
    Music(
            id = UUID.randomUUID().toString(),
            title = "Rap God",
            artists = listOf("Eminem"),
            imageUrl = "https://i.scdn.co/image/ab67616d00004851643e6ecebab400d52574e4b2",
            musicUrl = "", // add the url here
            duration = 363000L
        ),

About

It uses Firebase as its backend and also used AudD api to get lyrics of songs.

  • Fully functional.
  • Clean and Simple Material 3 UI built using Jetpack Compose.
  • It supports dark theme too πŸŒ— .

App Features

  • Home Screen - Shows a list of all songs available.
  • Music Player Screen - Music Player screen with music controls.
  • Playlist Screen - Screen showing the current playlist/play queue.

Insights into the app πŸ”Ž

πŸ“Έ Screenshots

Technical details

  • MusicX uses Firebase to fetch all songs.
  • MusicX uses AudD api to get lyrics of songs.
  • MusicX is built fllowing Material 3 Guidelines.
  • MusicX is built using Jetpack Compose.
  • MusicX is made using Kotlin and following Modern Android Development practices.
  • MusicX uses all Jetpack libraries and follows MVVM architecture. It also has a G.O.A.T rating in Android's M.A.D scorecard.
  • MusicX's code follows all the best practices and software development principles which make it a very good learning resource for beginners.

summary.png

Built With πŸ› 

  • Kotlin - First class and official programming language for Android development.
  • Jetpack Compose - Jetpack Compose is Android’s modern toolkit for building native UI.
  • Material 3 - Material Design 3, Google’s most expressive and adaptable design system
  • Coroutines - For asynchronous and more..
  • Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.
  • StateFlow - StateFlow is a state-holder observable flow that emits the current and new state updates to its collectors.
  • SharedFlow - A SharedFlow is a highly-configurable generalization of StateFlow.
  • Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • Room - Room is an android library which is an ORM which wraps android's native SQLite database
  • Exoplayer - Exoplayer library is used to play media in Android.
  • Dependency Injection -
    • Hilt-Dagger - Standard library to incorporate Dagger dependency injection into an Android application.
    • Hilt-ViewModel - DI for injecting ViewModel.
  • Backend
    • Firebase
      • Firebase Firestore - A NoSQL database to store all data
      • Firebase Storage - A Cloud storage.
  • AudD Api - Api to fetch lyrics of songs
  • Retrofit - An Http Client for android.
  • Timber - A simple logging library for android.
  • GSON Converter - A Converter which uses Moshi for serialization to and from JSON.
  • Coil - An image loading library for Android backed by Kotlin Coroutines.
  • Material Components for Android - Modular and customizable Material Design UI components for Android.

Package Structure

dev.vaibhav.musicX    # Root Package
.
β”œβ”€β”€ data                    # For data handling.
|   β”œβ”€β”€ local               # Room DB and its related classes
|   β”œβ”€β”€ remote              # Firebase, AudD and their relative classes
β”‚   β”œβ”€β”€ model               # Model data classes and mapper classes, both remote and local entities
β”‚   └── repo                # Single source of data.
|
β”œβ”€β”€ di                      # Dependency Injection             
β”‚   └── module              # DI Modules
|
β”œβ”€β”€exoplayer                # Exoplayer related files etc.
|
β”œβ”€β”€ ui                      # UI/View layer
|   β”œβ”€β”€ components          # Common Composaled required.
|   β”œβ”€β”€ screens             # All Screens in app.    
β”‚   β”œβ”€β”€ theme               # App theme related files.
β”‚   β”œβ”€β”€ usecases            # Use-cases for features.
|   β”œβ”€β”€ utils               # Utility classes for UI.
|
└── utils                   # Utility Classes / Kotlin extensions

Architecture

This app uses MVVM (Model View View-Model) architecture.


If you like my projects and want to support me to build more cool open source projects


Contact

If you need any help, you can connect with me.

Visit:- Vaibhav Jaiswal

You might also like...
Compose-video-player - Video player for Android Compose powered by ExoPlayer

Compose Video Player Video player for Android Compose powered by ExoPlayer. Addi

Another local music player for Android built with Compose. Way too
Another local music player for Android built with Compose. Way too "local" so you likely won't need it.

AnotherAndroidLocalMusicPlayer Another local music player for Android built with Compose and media3 (ExoPlayer). Warning The app behaves strangly as i

 An offline music player android app, with modern UI and powerful features
An offline music player android app, with modern UI and powerful features

Pulse Music An offline music player android app, with modern UI and powerful features If you liked this repo, fork it and leave a STAR. Your support m

Echo is a lightweight and minimal music player for Android, built with Android Studio and written in Kotlin
Echo is a lightweight and minimal music player for Android, built with Android Studio and written in Kotlin

Echo - Echo, A light-weight, minimal music player for Android, with shuffle, favorites and audio visualization

A elegant and light weight music player for android
A elegant and light weight music player for android

A elegant and light weight music player for android

A clean music player with a customizable widget, stylish interface and no ads.
A clean music player with a customizable widget, stylish interface and no ads.

Simple Music Player A clean music player with a customizable widget. A music player easily controllable from the status bar, home screen widget or by

A Spotify Clone that plays music and has similar UI to actual Spotify Mobile App. Made with Exoplayer and love ❀️
A Spotify Clone that plays music and has similar UI to actual Spotify Mobile App. Made with Exoplayer and love ❀️

Spotify Clone A Spotify Clone App that can play music, and has a good looking UI that is very similar to actual Spotify Mobile App on Play Store I use

Android music player example.
Android music player example.

Android music player example.

Odyssey music player

Odyssey This whole project is licensed under the GPLv3 or later license (see LICENSE) Screenshots Please check out the Frequently Asked Questions This

Comments
  • All dependencies version upgraded

    All dependencies version upgraded

    Updated all dependencies to latest version

    • Upgraded Gradle version to 7.4
    • Upgraded Gradle plugins
    • Upgraded AGP dependency from 7.0.4 to 7.3.0
    • Updated all dependencies to latest version
    opened by axatabyss 0
Releases(v1.0.3)
Owner
Vaibhav Jaiswal
Passionate Android Developer . Competitive programmer and Ui/UX designer.
Vaibhav Jaiswal
TunePlayer is a basic music player app aimed at showing how MusicServiceCompat and MusicBrowerCompat can be used to build a music playback service

TunePlayer TunePlayer is a basic music player app aimed at showing how MusicServiceCompat and MusicBrowerCompat can be used to build a music playback

Abdulmalik 6 Nov 18, 2022
SocyMusic is an open-source Android music player written in Java with the aim of creating an easy-to-use app for exchanging and listening to top-quality music. Help us create it!

SocyMusic SocyMusic is an open-source Android music player written entirely in Java. It's objectives are to provide top-quality music to everyone for

Benji 23 Dec 26, 2022
Blade is an open source music player for Android, allowing you to play music from multiple services : files on your phone, Spotify, and more.

Blade Player Blade is an open source music player for Android, allowing you to play music from multiple services : files on your phone, Spotify, and m

Valentin HAUDIQUET 72 Jan 5, 2023
This is a local music player, imitates the UI of Netease Music client.

Introduce This is a local music player, imitates the UI of Netease Music client. The UI was built on Jetbrains Compose. Screenshot Features Parse and

Konyaco 4 Dec 10, 2022
This is a local music player, imitates the UI of Netease Music client.

Introduce This is a local music player, imitates the UI of Netease Music client. The UI was built on Jetbrains Compose. Screenshots Features Parse and

Konyaco 4 Dec 10, 2022
Auxio is a local music player with a fast, reliable UI/UX without the many useless features present in other music players

Auxio A simple, rational music player for android. FAQ | Licenses | Contributing | Architecture About Auxio is a local music player with a fast, relia

null 3 Mar 21, 2022
Lightweight and Material designed Music Player

Music Player Lightweight and Material designed Music Player Based on Phonograph Features: Settings: Active tabs management Themes: Light, Dark, Black

Max 273 Dec 11, 2022
Best material design music player for Android

Metro Material Design music player for Android music lovers Table of contents Downloads Differences between Metro and RetroMusicPlayer Screenshots App

Muntashir Al-Islam 684 Jan 1, 2023
A material designed music player for Android

Vinyl Music Player A material designed local music player for Android. Forked from Phonograph; makes all Pro features free, as they used to be. Additi

Adrien Poupa 581 Dec 30, 2022