i have put image view layout in xml layout file
<ImageView 
  android:id="@+id/imageData"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_marginLeft="10sp"
  android:layout_marginTop="10sp"
/>
and setting the same in my code as..
ImageView imageData = (ImageView) findViewById(R.id.imageview);
now this imageData should hold the image when the activity launch..this is my code…
public class TestImageClass extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.imagetable);
        ImageView mChart = (ImageView) findViewById(R.id.imageview);
        String testurl = "http://....some image name....jpg";
        mChart.setTag(testurl);
        new DownloadImagesTask().execute(mChart);
    }   
    public class DownloadImagesTask extends AsyncTask<ImageView, Void, Bitmap> {
        ImageView imageView = null;
        @Override
        protected Bitmap doInBackground(ImageView... imageViews) {
            this.imageView = imageViews[0];
            return download_Image((String)imageView.getTag());
        }
        @Override
        protected void onPostExecute(Bitmap result) {
            imageView.setImageBitmap(result);
        }
        private Bitmap download_Image(String url) {
            Bitmap bm = null;
            try {
                Log.e("inside", "download image.....");
                URL aURL = new URL(url);
                URLConnection conn = aURL.openConnection();
                conn.connect();
                InputStream is = conn.getInputStream();
                BufferedInputStream bis = new BufferedInputStream(is);
                bm = BitmapFactory.decodeStream(bis);
                bis.close();
                is.close();
                Log.e("going out of", "download image.....");
            } catch (IOException e) {
                Log.e("Hub","Error getting the image from server : " + e.getMessage().toString());
            } 
            return bm;          
}
}
}
so now how to set this bitmap object "bm" to my ImageView?
 
    