我正在寻找一种在android文件系统中临时保存位图文件的方法。该文件是必需的,直到它被用作服务器POST请求的一部分后,我希望它不再存在。我正在寻找更快的方式来做到这一点。Android临时保存位图图像
...
File file = new File(Environment.getExternalStorageDirectory().getPath().toString()+"/ImageDB/" + fileName+".png");
FileOutputStream filecon = new FileOutputStream(file);
sampleResized.compress(Bitmap.CompressFormat.JPEG, 90, filecon);
...
我目前正在使用这种方法。
编辑:我有我的解决方案从Creating temporary files in Android