Is there a way to programatically get all the android system wallpapers?
I know how to get the current one, via WallpaperManager
, and then save it to disk. But I want to know if there is a way to access all the pictures that act as system wallpaper included with the O.S.
All the wallpapers are located in the launcher app. As the name of the launcher and its resources may vary accross devices, there is no way to create a reliable way to do this.
On stock Android the wallpapers are located in Launcher2.apk:res/drawable-somedpi. On my devices they were in the drawable-hdpi folder, but this may be different on others.
First get the resources of the launcher (com.android.Launcher2.apk) as described in this answer.
Then you can list the resources, using a method similar to the one in this question.
I haven't tried out all this myself, so it might not work as expected.
Just figure out where they are saved and access them that way.
来源:https://stackoverflow.com/questions/10566975/getting-all-system-wallpapers