unable to fetch image from url in android
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/12172928/android-image-view-from-url">Android image view from url</a>  </p>
</blockquote>



<p>I am trying to fetch the image from url and load in <code>imageView</code>, but I cannot encode the url string, please let me know how to encode this.</p>

<p>Please find the code &amp; url  used for your reference.</p>

<p>URL: <a href="http://images.pcmac.org/SiSFiles/Schools/TN/JacksonMadisonCounty/RoseHillMiddle/Uploads/Locations/%7BB690E93E-F7C9-48AF-B72A-BFF944FA6D4A%7D_104_9169.JPG" rel="nofollow">http://images.pcmac.org/SiSFiles/Schools/TN/JacksonMadisonCounty/RoseHillMiddle/Uploads/Locations/%7BB690E93E-F7C9-48AF-B72A-BFF944FA6D4A%7D_104_9169.JPG</a></p>

<h3>Code</h3>

<pre><code>String link=URLEncoder.encode(urlStr);                    
bitmap=loadBitmap(link);

public static Bitmap loadBitmap(String url) {
    Bitmap bitmap = null;
    try {
        InputStream in = new java.net.URL(url).openStream();
        bitmap = BitmapFactory.decodeStream(in);
    } catch (Exception e) {

    }        
    return bitmap;
}
</code></pre>
