Is there any Lock Screen WallPaper Manager class in android

不打扰是莪最后的温柔 提交于 2019-12-02 09:27:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!