3 Star 44 Fork 10

Ryan Zhu / OhosExtension

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ApplyWallpaperAsyncTask.md 509 Bytes
一键复制 编辑 原始数据 按行查看 历史
朱帆 提交于 2021-07-22 09:51 . 新增部分工具类与控件

ApplyWallpaperAsyncTask

设置壁纸任务

使用

Java:
new ApplyWallpaperAsyncTask(MainAbility.this, new File("imageFilePath"), new ApplyWallpaperAsyncTask.ApplyWallpaperListener() {
    // isSuccess 设置壁纸回调, true:设置壁纸成功; false:设置壁纸失败
    @Override
    public void onApplyWallpaperSuccessed(boolean isSuccess) {

    }
}).execute();
config.json:
{
    "name": "ohos.permission.SET_WALLPAPER",
    "reason": "设置壁纸"
}
Java
1
https://gitee.com/thoseyears/ohos-extension.git
git@gitee.com:thoseyears/ohos-extension.git
thoseyears
ohos-extension
OhosExtension
master

搜索帮助