저장할 폴더명과 이미지 파일명을 지정한다
지정한 저장경로로 촬영한 이미지를 저장할 수 있다
1
2
3
4
5
6
7
8
9
10
11
12
13
14
    //Camera App Call
    public void CameraAppCall(String dirPath, String fileName){
        Intent intent = new Intent();
 
        //촬영한 이미지 저장경로
        File file = new File(dirPath, fileName);
        intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
 
        //카메라앱 호출
        intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
 
        ((Activity)context).startActivityForResult(intent, REQUEST_CODE_CAMERA_APP_CALL);
    }
 
cs

이러면 사진이 2군데에 저장된다. (내가 지정한 경로와 카메라앱이 저장하는 경로)


+ Recent posts