首页 > 解决方案 > MIUI 10.2 Redmi 设备的锁屏上未设置壁纸

问题描述

我正在尝试在 miui 10.2 Redmi 设备的锁定屏幕上设置壁纸。

我可以使用以下代码设置主屏幕壁纸:

 wallpaperManager.setBitmap(crackedBitmap);

但是,当我尝试使用此代码设置锁屏壁纸时,它不起作用:

WallpaperManager wallpaperManager;
wallpaperManager = WallpaperManager.getInstance(getApplicationContext());
wallpaperManager.setBitmap(bitmap,null,true,WallpaperManager.FLAG_LOCK);

Toast 正在打印已设置壁纸但未在锁定屏幕中显示

标签: javaandroidlive-wallpaperandroid-wallpaper

解决方案


MIUI 不允许,检查thisthisthis

到目前为止,您似乎无法做到这一点。


推荐阅读