Your music. Your lock screen.
DynamicLock is a free and open source Android app that automatically updates your lock screen wallpaper with high-quality album art of the song currently playing on Spotify. Every song, a new wallpaper β no effort needed.
If you just want to use the app:
- Install the APK
- Grant Notification Access
- Play music on Spotify
You do not need to create or add any Spotify API keys.
If you want to build, test, or contribute to this project from source, follow the development setup sections below.
- Install the app
- Grant Notification Access
- Play any song on Spotify
- The app fetches high-quality album art from Spotify via a secure backend
- Your lock screen wallpaper automatically updates with a beautiful blurred background + centered album art
- When you close Spotify, the wallpaper resets back to default
DynamicLock uses a backend-first approach for high-quality album art:
Phone App β Backend Server β Spotify Web API β Album Art (high-res)
- Android App: Detects playing song, requests album art from backend
- Backend: Holds API credentials securely, exchanges them for Spotify access token, fetches album metadata
- Spotify Web API: Returns the highest-quality album image available
This ensures:
- β API credentials are never embedded in the APK
- β Album art is always the highest quality available
- β No user login required
- β Fast, cached responses
We take your privacy seriously. Here's our promise:
| β | No user data collected |
| β | No tracking or analytics |
| β | No ads |
| β | API credentials stay on backend server only |
| β | Backend only fetches public album metadata |
| β | Open source β audit it yourself |
What gets sent to the backend?
- Only the Spotify track ID (e.g.,
3n3Ppam7vgaVa1iaRUc9Lp) - The backend then exchanges its configured API credentials for an access token and fetches album metadata
Do users need their own API key?
- No. The app uses backend-configured API credentials to fetch album covers.
- Normal users only install the APK and grant required permissions.
What about the host running the backend?
- If you deploy the backend on your own server, only you see the traffic
- If you use a third-party host, follow their privacy policy
- Spotify album metadata is public; no private user data is fetched
DynamicLock is and will always be:
- π Free β no paid version, no premium tier
- π Open Source β full source code available
- π« No Ads β forever
- π€ Community Driven β contributions are welcome
- Android 7.0 (API 24) or higher
- Spotify app installed
- Notification Access permission
Want to contribute or test DynamicLock locally? Follow these steps:
- Backend: Python 3.8+, pip
- Android: Android Studio (latest), JDK 17+, Android SDK (API 36)
- Spotify (only if self-hosting backend): Developer account (free) with Client ID and Secret
- Device: Android phone (7.0+) connected via USB, or Android emulator
- Go to Spotify Developer Dashboard
- Create a new app (accept terms, fill in details)
- Copy your Client ID and Client Secret
- Keep these secure β never commit them to git
git clone https://github.com/mclovin22117/dynamic-lockscreen-wallpaper.git
cd dynamic-lockscreen-wallpaper/backend
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Copy example env file
cp .env.example .env
# Edit .env and paste your Spotify credentials
# SPOTIFY_CLIENT_ID=your_id_here
# SPOTIFY_CLIENT_SECRET=your_secret_here
nano .env# From backend/ folder with .venv activated:
python -m uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000You should see:
Uvicorn running on http://0.0.0.0:8000
Test it:
curl http://localhost:8000/health
# Should return: {"status":"ok"}cd ../ # Back to project root
# Edit local.properties and add:
# spotify.cover.api.baseUrl=http://127.0.0.1:8000
# spotify.cover.api.authToken=
nano local.properties# Connect phone via USB and enable USB debugging
# Then:
adb reverse tcp:8000 tcp:8000 # Forward localhost:8000 to phone
# Build and install debug APK
./gradlew installDebug- Open app on phone
- Grant Notification Access in settings
- Play a song on Spotify
- Lock screen wallpaper should update within seconds
- Check logs:
adb logcat | grep DynamicLockLook for:
Using backend cover art: 640x640
Lock screen wallpaper updated successfully
To generate a signed APK for testing:
# Make sure your backend is deployed to a public URL first
# Then update local.properties:
# spotify.cover.api.baseUrl=https://your-api-domain.com
# spotify.cover.api.authToken=your_token_if_needed
# Build release APK
./gradlew assembleRelease
# APK: app/build/outputs/apk/release/app-release.apk
# Or install directly
./gradlew installReleaseFor real-world use, you'll need:
-
Deploy Backend to a public server (Railway, Render, Fly.io, AWS, VPS, etc.)
- Set environment variables on the server
- Use HTTPS only
- Add basic rate limiting and logging
-
Update Android App to use your backend URL:
- Build release APK
- Distribute via GitHub Releases or F-Droid
-
Optional: Add backend authentication token if deploying publicly
Full production guide coming soon.
Found a bug? Have an idea? Contributions are welcome!
- Fork this repo
- Create a feature branch (
git checkout -b feature/your-idea) - Make your changes
- Test locally (follow dev setup above)
- Commit and push
- Open a Pull Request
Before contributing:
- Keep Android code in
app/ - Keep backend code in
backend/ - Never commit
.envorkeystore.properties - Follow existing code style (Kotlin + Python conventions)
- Test on multiple Android versions if possible
MIT License β feel free to use this code for anything.
- Spotify Developer: https://developer.spotify.com
- Android Studio: https://developer.android.com/studio
- Backend Framework: FastAPI (https://fastapi.tiangolo.com)
Have questions? Issues? Suggestions?
- Create an Issue
- Check existing discussions first
Made with β€οΈ for music lovers everywhere. 3. Create a new branch
git checkout -b feature/your-feature-name- Make your changes and push
git add .
git commit -m "Add: your feature"
git push origin feature/your-feature-name- Open a Pull Request β contributions are always welcome!
Open an issue on GitHub: π github.com/mclovin22117/dynamic-lockscreen-wallpaper/issues
Please include:
- Your Android version
- Your device model
- Steps to reproduce the bug
- Relevant logs (
adb logcat -s "DynamicLock")
This project is licensed under the MIT License β see the LICENSE file for details.
Made with β€οΈ by mclovin22117