I am getting photo with my camera(mobile) and then I need that to set it wallpaper but get me crash.
When I use from setWallpaper() it say me The method setW
You need to use the WallpaperManager Class if You develop higher API Level 5:
WallpaperManager mManager = WallpaperManager.getInstance(getApplicationContext());
try {
mManager.setResource(R.drawable.yourDrawable);
} catch (IOException e) {
//warning for the user
e.printStackTrace();
}
And to use the manager, You need to set permissions SET_WALLPAPER in the manifest. Also, if You develop under API Level 5 and You want to use the method that You used, You have to set the Permission too.