问题
Like there is a WallpaperManager class in android. Is there is any class in android for getting Lock screen drawable ? So that i can set that Lock screen drawable as a background image in my application's screen lock.
回答1:
As of API 24, WallpaperManager now has two new methods: getWallpaperFile and getWallpaperId. You can pass in WallpaperManager.FLAG_SYSTEM for the system wallpaper or WallpaperManager.FLAG_LOCK for lock screen wallpaper. But again, this is only supported in API 24.
[EDIT]
setBitmap can accept the new flags as well, so you can choose which wallpaper you'd like to set.
来源:https://stackoverflow.com/questions/19331700/is-there-any-lock-screen-wallpaper-manager-class-in-android