PictureCallback mPicture = new PictureCallback() {
public void onPictureTaken(byte[] data, Camera camera) {
String saveFolder = "/DCIM/TheHiddenCatch";
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
Date currentTime_1 = new Date();
String dateString = formatter.format(currentTime_1);
String savePicName = saveFolder + "/pic_"+ dateString +".jpg";
File file = new File(savePicName);
try {
FileOutputStream out = new FileOutputStream(file);
out.write(data);
out.flush();
out.close();
}catch(Exception e){
Toast.makeText(mm_Camera.this, "파일 저장 중 에러 발생 : " +
e.getMessage(), 0).show();
return;
}
Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
Uri uri = Uri.parse("file://" + savePicName);
intent.setData(uri);
sendBroadcast(intent);
Toast.makeText(mm_Camera.this, "사진 저장 완료 : " + savePicName, 0).show();
mSurface.mCamera.startPreview();
}
};
코드는 위와 같습니다..
sd카드가 없어서 그냥 내장메모리에 저장했으면 하는데요...
에러가 나네요....
폴더지정이 잘못된걸까요....
아님 내장메몰에 저장할때도 sd카드처럼 퍼미션 추가가 필요한건가요?;;;



