MIUI 10.2红米设备锁屏壁纸无法设置

3

我正在尝试在miui 10.2红米设备上设置锁屏壁纸。

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

 wallpaperManager.setBitmap(crackedBitmap);

但是当我尝试使用这段代码设置锁屏壁纸时,它无效:

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

Toast打印告知壁纸已经设置,但无法在锁定屏幕中显示


1
MIUI不允许这样做https://in.c.mi.com/thread-1252992-1-0.html。看起来你无法做到。 - Shrey Garg
好的,谢谢 @ShreyGarg - Sagar gujarati
1个回答

2
MIUI不允许更改锁屏壁纸,可以查看此链接此链接此链接。目前似乎没有任何方法可以更改锁屏壁纸。

你有没有将位图重定向到Google壁纸应用程序的代码? - Sagar gujarati
不,一个好的方法是让用户下载图片并帮助他/她在相册中打开以设置壁纸。 - Shrey Garg

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接