1
我的設備是三星s第一張圖像保存在SD卡/ DCIM第二張圖像保存在SD卡/目錄 爲什麼?當我拍照時雙保存圖像
我該怎麼辦?我不想第一個圖像
這裏是我的代碼
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(getTempFile()));
startActivityForResult(intent,TAKE_PHOTO_CODE);
..
private File getTempFile(){
File root = new File(Environment.getExternalStorageDirectory(),"universalmemo/"+"data/"+"memo/"+"picturememo");
if(!root.exists()){
root.mkdirs();
}
File file = new File(root,getDateTime());
return file;
}
..
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Intent intent2 = new Intent();
if(requestCode == TAKE_PHOTO_CODE && resultCode == RESULT_OK){
intent2.putExtra("Filename", datetime);
setResult(RESULT_OK,intent2);
}
else setResult(RESULT_CANCELED,intent2);
finish();
}
..
感謝你的幫助