Tuesday, September 27, 2011

Android: Load image from web


public Bitmap getRemoteImage(final URL aURL) {
      try {
            final URLConnection conn = aURL.openConnection();
            conn.connect();
            final BufferedInputStream bis = new BufferedInputStream(conn.getInputStream());
            final Bitmap bm = BitmapFactory.decodeStream(bis);
            bis.close();
            return bm;
      } catch (IOException e) {
            [...]
      }
      return null;
}

1 comment:

italia-iptv.it said...

Streaming of the preferred IPTV submissions are not illegal as long as the provider pays for the broadcast rights. When the membership is against the law, the company will be able to identify this and suspend the bond to the Internet italia-iptv.it.