Skip to content

Dynamic lockscreen wallpaper based on Spotify cover art Native Android app that updates your lock screen in real time using music notifications and the Spotify API.

License

Notifications You must be signed in to change notification settings

bguerraDev/DynamicCoverArtLockScreen

Repository files navigation

🎧 DynamicCoverArtLockScreen

📘 Read this in Spanish

DynamicCoverArtLockScreen is a native Android application that dynamically updates your device's lock screen wallpaper with the current music track's cover art. It uses the Spotify API and Android's NotificationListenerService to extract music metadata from the notification shade in real time.


🚀 Features

  • Retrieves currently playing track info from your notifications.
  • Uses Spotify API to fetch high-resolution cover art.
  • Automatically updates your lock screen wallpaper.
  • Clean and efficient Kotlin codebase with modular architecture.

📸 Screenshots

In this section, you can see the app working in my favourite music:


📒 Technologies Used

  • Kotlin (Android native)
  • Spotify API for authentication and metadata
  • Retrofit for network requests
  • Jetpack NotificationListenerService
  • Palette KTX to extract vibrant colors from images

🔧 Project Structure

com.bryanguerra.dynamiccoverartlockscreen
├── models
│   └── DataModel.kt
├── spotify
│   ├── SpotifyApiManager.kt
│   ├── SpotifyApiService.kt
│   ├── SpotifyAuthApi.kt
│   └── SpotifyAuthManager.kt
├── utils
│   ├── CoverArtManager.kt
│   ├── DownloadUrl.kt
│   └── WallpaperUtils.kt
├── CoverArtLockscreenService.kt
└── MainActivity.kt

📦 Setup & Configuration

  1. Clone the repository:
git clone https://github.com/bguerraDev/DynamicCoverArtLockScreen.git
  1. Create a local.properties file in the root directory and add your Spotify credentials:
SPOTIFY_CLIENT_ID=your_client_id_here
SPOTIFY_CLIENT_SECRET=your_client_secret_here
  1. Open the project in Android Studio.

  2. Inside the CoverArtLockscreenService.kt file you must change the package name by yours preferred music service

  3. Build and run the app on a device with Android 12 (API 31) or higher.


🔐 Permissions

The app uses the following permissions:

  • SET_WALLPAPER: To set the cover art as lock screen wallpaper.
  • MANAGE_EXTERNAL_STORAGE: To manage wallpaper files (on Android 11+).
  • READ_MEDIA_IMAGES: Required on Android 13+ to access cover images.
  • Notification access: Needed to listen to currently playing songs.

Make sure to grant notification access manually after installing.


📜 License

This project is licensed under the MIT License. However, attribution is required if you use or modify any part of the code or idea.

© 2025 Bryan Guerra – All rights reserved.

About

Dynamic lockscreen wallpaper based on Spotify cover art Native Android app that updates your lock screen in real time using music notifications and the Spotify API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages