Q:

Setting Bitmap as wallpaper

I want to display an image from URL and then set that displayed image as wallpaper on the phone at button click..Currently it is displaying the image but nothing happens when the button is pressed to save it..Here is the code i am using..Kindly find out what i am doing wrong..thanks in advance
set = (Button) findViewById(R.id.abcd);

new DownloadImageTask((ImageView) findViewById(R.id.imageView1)).execute("http://java.sogeti.nl/JavaBlog/wp-content/uploads/2009/04/android_icon_256.png");

set.setOnClickListener(new View.OnClickListener() {

    public void onClick(View arg0) {
        // TODO Auto-generated method stub

        Thread th = new Thread(){
            public void run(){
            WallpaperManager image = WallpaperManager.getInstance(getApplicationContext());
            try{
                image.setBitmap(photo);
            }
            catch(Exception ex)
            {
                ex.printStackTrace();
            }
            }
        };
        th.start();
    }

});

}

private class DownloadImageTask extends AsyncTask<String, Void, Bitmap> {
    ImageView bmImage;

    public DownloadImageTask(ImageView bmImage) {
        this.bmImage = bmImage;
    }

    protected Bitmap doInBackground(String... urls) {
        String urldisplay = urls[0];
        Bitmap photo = null;
        try {
InputStream in = new java.net.URL(urldisplay).openStream();
babes = BitmapFactory.decodeStream(in);
        } catch (Exception e) {
Log.e("Error", e.getMessage());
e.printStackTrace();
        }
        return photo;
    }

    protected void onPostExecute(Bitmap result) {
        bmImage.setImageBitmap(result);
    }
} 

A:

Have you added this permission?
<uses-permission android:name="android.permission.SET_WALLPAPER" />

