2

I successfully retrieved the selected wallpaper from wallpaper manager and applied it to my app background with this code:

`

    LinearLayout parent = (LinearLayout) findViewById(R.id.linearLayoutParent);

    final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
    final Drawable wallpaperDrawable = wallpaperManager.getDrawable();

    parent.setBackgroundDrawable(wallpaperDrawable);

`

But this code doesn't work if the selected wallpaper is a live wallpaper, i just searched for a solution in google and didn't find any.

Jasonw
  • 5,054
  • 7
  • 43
  • 48
Steve
  • 427
  • 4
  • 14

0 Answers0