public static Bitmap[] getBitmapFromURL(String[] path) throws MalformedURLException {
Bitmap[] b = new Bitmap[path.length];
for (int i = 0; i < path.length; i++) {
URL url = new URL(path[i]);
HttpURLConnection conn = null;
try {
conn = (HttpURLConnection)url.openConnection();
conn.setConnectTimeout(5000);
conn.setRequestMethod("GET");
if(conn.getResponseCode() == 200){
InputStream inputStream = conn.getInputStream();
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
b[i]=bitmap;
}
} catch (IOException e) {
e.printStackTrace();
}
}
return b;
}