An Android app that imports Spotify playlists, downloads songs via SoundCloud, and plays them locally with full playlist management and Bluetooth headphone support.
- Spotify Playlist Import - Paste a Spotify playlist URL and the app fetches all track info via the Spotify Web API
- SoundCloud Downloads - Automatically searches SoundCloud for each track and downloads the audio (no YouTube intros)
- Playlist Management - Create, rename, and delete playlists. Remove individual songs
- Music Playback - Play, pause, skip, seek with shuffle mode
- Bluetooth Support - Full AVRCP support for play/pause/skip from Bluetooth headphones, plus lock screen and notification controls
- Background Playback - Music continues playing when the app is in the background
- Audio Focus - Auto-pauses for phone calls, navigation, etc. Auto-pauses when headphones are disconnected
- Spotify Developer Account - Create an app at developer.spotify.com/dashboard to get a Client ID and Client Secret
- Android Studio - For building the app (includes JDK 17 and Android SDK)
- Open the project folder in Android Studio
- Let Gradle sync complete
- Click Run or Build > Build Bundle(s) / APK(s) > Build APK(s)
- APK will be at
app/build/outputs/apk/debug/app-debug.apk
# Requires JDK 17+ and Android SDK
./gradlew assembleDebugSpotify Playlist URL
↓
Spotify Web API (get track names + artists)
↓
SoundCloud Search (find matching tracks)
↓
SoundCloud Stream Download (progressive MP3)
↓
Local Storage + Room Database
- Kotlin + Jetpack Compose - Modern Android UI
- Media3 (ExoPlayer) - Audio playback engine
- MediaSession - System media integration (Bluetooth, notifications, lock screen)
- Room - Local SQLite database for playlists and songs
- OkHttp - Network requests to Spotify and SoundCloud APIs
- Coroutines + Flow - Async operations and reactive data
MusicPlayerService- Background service with MediaSession for Bluetooth/notification controlsSoundCloudApi- Extracts client_id from SoundCloud's JS bundles, searches tracks, downloads audioSpotifyApi- Client credentials auth, playlist track fetching with paginationMusicRepository- Orchestrates the full download pipelinePlayerViewModel- Connects UI to MediaController for playback control
- Open the app and tap the download button (bottom right)
- Enter your Spotify Client ID and Client Secret (saved for next time)
- Paste a Spotify playlist URL
- Tap Fetch Playlist to see the track list
- Tap Download All via SoundCloud to start downloading
- Once complete, go back to see your playlist
- Tap Play All or Shuffle to start listening
- Use Bluetooth headphones - play/pause/skip all work automatically
| Component | Library |
|---|---|
| UI | Jetpack Compose + Material3 |
| Audio | Media3 ExoPlayer 1.2.1 |
| Bluetooth/Media | Media3 MediaSession |
| Database | Room 2.6.1 |
| Networking | OkHttp 4.12 |
| JSON | Gson 2.10.1 |
| Navigation | Navigation Compose 2.7.7 |
| Min SDK | Android 8.0 (API 26) |