Я использую ниже метод для загрузки одного изображения из URL
public static Bitmap getBitmap(String url) {
try {
InputStream is = (InputStream) new URL(url).getContent();
Bitmap d = BitmapFactory.decodeStream(is);
is.close();
return d;
} catch (Exception e) {
return null;
}
}
Иногда я получаю исключение outofmemory.
Я не могу исключить исключение из памяти. Приложение закроется. Как предотвратить это?
Есть ли лучший способ загрузки изображений, который также быстрее?