Android examples for Network:URL
get Image From URL
//package com.java2s; import java.io.InputStream; import java.net.URL; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap getImageFromURL(String strUrl) { Bitmap bmp = null;/*from w w w . j a va 2s .c o m*/ try { URL url = new URL(strUrl); InputStream in = url.openStream(); bmp = BitmapFactory.decodeStream(in); in.close(); } catch (Exception e) { return null; } catch (Error err) { return null; } return bmp; } }