Search code examples
javaandroidlive-wallpaperandroid-wallpaper

Wallpaper does not set on lock screen on MIUI 10.2 redmi devices


I am trying to set wallpaper on lock screen in miui 10.2 Redmi devices.

I can set home screen wallpaper using this code :

 wallpaperManager.setBitmap(crackedBitmap);

But when i am trying to set lock screen wallpaper using this code it's not working :

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

Toast is printing that wallpaper is set but not showing in lock screen


Solution

  • MIUI does not allow it, check this, this or this.

    It seems there is no way you can do it as of now.