I have a problem when I use MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA in intent. The camera starts up correctly, but does not save the files in my "/ photo" folder. But when I use MediaStore.ACTION_IMAGE_CAPTURE, it works fine, but I can not use it because it only takes one photo each time. I need a camera and the user takes a lot of photos. After he closes the camera, and all the photos will be saved in my specific folder.
Thank you for your help.
Hi,
Marcelo
Source:
public void startCamera() { Intent takePictureIntent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA); File file = null; try { file = createImageFile(); takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file)); } catch (IOException e) { file = null; Log.e(this.getClass().getName(), e.getMessage(), e); } activity.startActivity(takePictureIntent); } private File createImageFile() throws IOException { String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); String imageFileName = JPEG_FILE_PREFIX + timeStamp + JPEG_FILE_SUFFIX; return new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/photo/", imageFileName); }
source share