0
는 지금, 나는 이미지를로드하기 위해 다음과 같은 방법으로 일하고 있어요 :Android가 데이터를 캐시에 저장하는 시간은 얼마입니까? 또는 저장된 최대 데이터 크기는 얼마입니까?
public static Drawable loadCachedImage(String strUrl) {
try {
URL url = new URL(strUrl);
URLConnection connection = url.openConnection();
connection.setUseCaches(true);
Object response = connection.getContent();
if (response instanceof Bitmap) {
Bitmap bitmap = (Bitmap)response;
return new BitmapDrawable(bitmap);
} else {
InputStream is = (InputStream) connection.getContent();
return Drawable.createFromStream(is, "src name");
}
} catch (Exception e) {}
return null;
}
AFAIK, 그것은 안드로이드의 기본 캐시를 사용합니다. 그래서, 주어진 앱 정보를 저장하는 데 걸리는 시간 (또는 저장된 최대 데이터 크기)을 알고 싶습니다. 설정 구성입니까?
미리 감사드립니다.