What is the best way to get an image from URL to ImageView in Android
<p>I am using a method to get the Image from URL when a button is clicked but it gets too much time, about 4-5 seconds to show an image sized only 6 kb using 3G not wi-fi. </p>

<p>My method is this;</p>

<pre><code>public static Bitmap getBitmapFromURL(String src) {
    try {
        Log.e("src",src);
        URL url = new URL(src);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setDoInput(true);
        connection.connect();
        InputStream input = connection.getInputStream();
        Bitmap myBitmap = BitmapFactory.decodeStream(input);
        Log.e("Bitmap","returned");
        return myBitmap;
    } catch (IOException e) {
        e.printStackTrace();
        Log.e("Exception",e.getMessage());
        return null;
    }
}
</code></pre>

<p>and then;</p>

<pre><code>    Bitmap bimage =  getBitmapFromURL("http://www.replikler.net/test2.jpg");
    ImageView image = (ImageView)findViewById(R.id.movie_image);
    image.setImageBitmap(bimage);
</code></pre>

<p>do you know another way (faster) to get an image from url ?</p>
