I am trying to fetch image from net and display it in imageview
My problem is that i am able to fetch image if the url is HTTP but not if url is HTTPS
I am using the following code :-
Bitmap bitmap = null;
InputStream in = null;
try {
URL url = new URL(URL);
URLConnection conn = url.openConnection();
// HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.connect();
in = conn.getInputStream();
bitmap = BitmapFactory.decodeStream(in);
in.close();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
return bitmap;