I want to change the lockscreen wallpaper of android. I was able to change home screen wallpaper through WallpaperManager.setResource
But not able to set LockScreen Wallpaper
I want to change the lockscreen wallpaper of android. I was able to change home screen wallpaper through WallpaperManager.setResource
But not able to set LockScreen Wallpaper
This is now possible with the updated Android API in API Level 24.
You have to provide the target WallpaperManager.FLAG_LOCK flag via the setResource
method.
int setResource (int resid, int which)
See the updated documentation for the WallpaperManager
Edit: See Mikepenz's answer for API 24+.
According to CommonsWare (who generally knows what he's talking about), there's no such thing as a lockscreen wallpaper, and there's no way of changing the lock screen background through the API.
See https://mcmap.net/q/420662/-how-to-set-android-lock-screen-image.
© 2022 - 2024 — McMap. All rights reserved.