Getting all system wallpapers
Asked Answered
B

2

8

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.

Beryllium answered 12/5, 2012 at 20:0 Comment(2)
You must clarify your question: "all the pictures that act as system wallpaper". As there can be only one system wallpaper active at a time, this might not be your question. If your question is how to list all POSSIBLE wallpapers you must specify what makes a image a wallpaper, otherwise you can simply take a list of all images on the phone.Exhume
Android comes with a Wallpaper application by default. Its pictures to use as wallpapers are not files in the sd card. They are resources in the apk, instead. I want to access them by code. Thanks.Beryllium
C
4

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.

Countrybred answered 21/5, 2012 at 20:46 Comment(3)
You can install wallpapers and remove then independent of the launcher. So inspecting the launchers package does not help!Exhume
If you decompile the Launcer2.apk with apktool, you will see it contains the wallpapers. I'm not totaly sure what you mean by 'installing a wallpaper'.Countrybred
Thanks for pointing me in a direction. I'm able to get a Resources for com.android.launcher (API level 7), but listing files in res dir returns nothing. I'll keep trying.Courtland
C
-3

Just figure out where they are saved and access them that way.

Corral answered 18/5, 2012 at 23:54 Comment(1)
This could possibly pass as a comment, but it certainly isn't an answer. Sorry!Durston

© 2022 - 2024 — McMap. All rights reserved.