A simple Android Music Player built using Kotlin, Retrofit, MediaPlayer, and Jetpack Fragments. It fetches music data from the Deezer API and allows users to play preview tracks with playback controls and notifications.
- Foreground audio playback via
MediaPlayerin aService - Play/Pause/Next/Previous track support
- Real-time SeekBar sync using
BroadcastReceiver - Persistent notification with media controls
- Using localbinder for direct communication between activity and service (optimisation)
- Language: Kotlin
- UI: XML, Fragments, RecyclerView
- Networking: Retrofit2, Gson
- Media:
android.media.MediaPlayer - Image Loading: Picasso
- Architecture: Service (Foreground and bound )+ BroadcastReceiver communication
| Song List Fragment | Music Player UI |
|---|---|
![]() |
![]() |
-
Clone this repository
git clone https://github.com/Manash396/MusicApp.git
-
Open in Android Studio
-
Set up your Deezer API key
- Sign up at RapidAPI
- Replace the headers in
ApiInterface.kt:@Headers( "X-RapidAPI-Key: YOUR_API_KEY", "X-RapidAPI-Host: deezerdevs-deezer.p.rapidapi.com" )
-
Run the app
This project is licensed under the MIT License. Feel free to fork, improve, and build upon it.
- Add ViewModel & LiveData for cleaner architecture
- Implement ExoPlayer for better media handling
- Add full track support & search functionality
- Save playback state across app restarts

