让所有的系统壁纸 [英] Getting all system wallpapers

查看:159
本文介绍了让所有的系统壁纸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法以编程方式让所有的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.

然后你可以列出的资源,用一个类似于在<一的方法href="http://stackoverflow.com/questions/1495585/how-can-i-get-a-directory-listing-of-resources-from-my-android-app">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.

这篇关于让所有的系统壁纸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆