写真を保存し、アプリを閉じて、フォルダを見つける保存システムを作成しました。画像を開きたいのですが、画像の開きが非常に遅いです。テレフォンサムスンギャラクシーwをリセットすると、この画像は非常に速く開きます(1秒)。私のコードの何が問題になっていますか?
private String mImagePath = Environment.getExternalStorageDirectory() + "/anppp";
private File file;
public void save() {
File dirPath = new File(Environment.getExternalStorageDirectory().toString() + "/anppp");
dirPath.mkdirs();
Calendar currentDate = Calendar.getInstance();
SimpleDateFormat formatter= new SimpleDateFormat("yyyyMMMddHmmss");
String dateNow = formatter.format(currentDate.getTime());
file = new File(mImagePath + "/"+"ProPaint-" + dateNow +".jpg");
FileOutputStream fos=null;
try {
if(!file.exists())
file.createNewFile();
fos = new FileOutputStream(file);
mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);
fos.close();
} catch (FileNotFoundException e) {
Log.e("Panel", "FileNotFoundException", e);
} catch (IOException e) {
Log.e("Panel", "IOEception", e);
}
}