让所有的系统壁纸有的、壁纸、系统

2023-09-06 13:50:18 作者:二乔.

有没有一种方法以编程方式让所有的android系统壁纸?

Is there a way to programatically get all the android system wallpapers?

我知道如何获得当前,通过 WallpaperManager ,然后将其保存到磁盘。但我想知道是否有一种方法来访问所有作为系统壁纸包含在操作系统中的图片

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.

在普通的Andr​​oid壁纸位于Launcher2.apk:RES / drawable-的 somedpi 的。在我的设备,他们在绘制 - 华电国际的文件夹,但是这可能是别人不同的。

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.

首先得到启动(com.android.Launcher2.apk)的资源,如这个的答案描述。

First get the resources of the launcher (com.android.Launcher2.apk) as described in this answer.

然后你可以列出的资源,用一个类似于在this的问题。

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.