private Bitmap decodeUriAsBitmapFromNet(String url) {
URL fileUrl =
null;
Bitmap bitmap =
null;
try {
fileUrl =
new URL(url);
}
catch (MalformedURLException e) {
e.printStackTrace();
}
try {
HttpURLConnection conn = (HttpURLConnection) fileUrl
.openConnection();
conn.setDoInput(
true);
conn.connect();
InputStream is = conn.getInputStream();
bitmap = BitmapFactory.
decodeStream(is);
is.close();
}
catch (IOException e) {
e.printStackTrace();
}
return bitmap;
}