3

my application is making photos and viewing them in ImageView.

Everything works fine, but images I make in my application are saved in folder DCIM/CAMERA/ with names like "1369434756474" or "1369920366597".

I would like to save images like original camera in default folder DCIM/100MSDCF with default names like "DSC00013" or DSC00233". I am using Sony Xperia X10Mini but I would like my app worked fine on all devices.

Below is my code of requesting image capture:

if (isImageCatchingIntentAvailable()){
    String fileName = "photo.jpg";  
    ContentValues values = new ContentValues();  
    values.put(MediaStore.Images.Media.TITLE, fileName);  
    mImageCaptureUri = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);

    Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
    intent.putExtra(MediaStore.EXTRA_OUTPUT, mImageCaptureUri);
    startActivityForResult(intent, MAKE_PHOTO);
}

0 Answers0