2

I want to get mobile`s current wallpaper and set that image as the background image of the application. I tried this way but its show a run time exception

final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
final Drawable wallpaperDrawable = wallpaperManager.getDrawable();
layout.setBackground(wallpaperDrawable);
user2136160
  • 235
  • 2
  • 5
  • 13
  • Check [This](http://stackoverflow.com/questions/14713731/use-phone-wallpaper-as-app-background-theme-wallpaper-like-behaviour) – android_guy Oct 12 '13 at 16:49

1 Answers1

1
 final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
 final Drawable wallpaperDrawable = wallpaperManager.getFastDrawable();
 getWindow().setBackgroundDrawable(wallpaperDrawable);
user2136160
  • 235
  • 2
  • 5
  • 13