i am developing a program which uses the android camera to take pictures. but when i capture the pic i will have 2 result pics both in /sdcard/dcim and in my output dir. this situation happens in my htc desire and sumsung p1000, but in my huwei device the pic would be saved only in my output dir, there is not a copy in /sdcard/dcim. why and how to fix it?
and this is my code to call the camera
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(strFilePath)));
startActivityForResult(intent, CAMERA_RESULT_CODE_PIC_TAKEN);
I had have the same problem and could not solve it. The behaviour did not occur on all devices and/or all Android Versions, but i tryed to find out if a second copy exists and delete the copy. I used the following code to find the last taken picture.
But because of beeing unsatisfied by this solution,finally i decided to write a custom camera app to avoid the strange behaviour.