0
URL에서 이미지를로드하는 중 WebView
에 저장하고 싶지만 저장하지 않습니다.저장하는 방법 안드로이드에서 WebView를 저장하는 방법
이것은 내 코드입니다.
Uri uri="http://202.87.34.17/MobileDetect/Wallpaper/Wallpaper_01.jpg";
widget29=(WebView)findViewById(R.id.widget29);
widget29.loadUrl(IMAGE);
save();
try{
String path = Environment.getExternalStorageDirectory().toString();
OutputStream fOut = null;
File file = new File(path, "/sdcard"+IMAGE_FILENAME+".jpg");
fOut = new FileOutputStream(file);
Bitmap mBitmap = null;
mBitmap.compress(Bitmap.CompressFormat.JPEG, 85, fOut);
fOut.flush();
fOut.close();
MediaStore.Images.Media.insertImage(getContentResolver(),
file.getAbsolutePath(), file.getName(),file.getName());
} catch (Exception e) {
e.printStackTrace();
}
어떤 문제가 있습니까? pls logcat을 올바르게 검토하기 위해 붙여 넣으십시오. –
다음 번에 코드를 포맷 해보십시오. 'save()'메소드는 무엇을하고 있습니까? –
어디에서 비트 맵을 인스턴스화합니까? – Moystard