Tuesday, 6 August 2019

Get an image/screenshot of live wallpaper on Android?

Is there a way to get an image of the current live wallpaper using the WallpaperManager API? I tried the following code, but it simply returned the the icon of the app that was used to set the wallpaper.

  PackageManager pm = getApplicationContext().getPackageManager();

    // Check if user has set a live wallpaper
    if (WallpaperManager.getInstance(this).getWallpaperInfo() != null) {
        Drawable wallpaperDrawable = WallpaperManager.getInstance(this).getWallpaperInfo().loadThumbnail(pm);
    }



from Get an image/screenshot of live wallpaper on Android?

No comments:

Post a Comment