double save image when i take a picture
<p>my device is samsung s first image is saved in sdcard/DCIM  second image is saved in sdcard/mydirectory 
why???</p>

<p>and what should i do? i dont want first image</p>

<p>here is my code </p>

<pre><code>Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);    
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(getTempFile()));    
startActivityForResult(intent,TAKE_PHOTO_CODE);
</code></pre>

<p>..</p>

<pre><code>private File getTempFile(){
  File root = new File(Environment.getExternalStorageDirectory(),"universalmemo/"+"data/"+"memo/"+"picturememo");
  if(!root.exists()){
    root.mkdirs();
  }
  File file = new File(root,getDateTime());
  return file;
}
</code></pre>

<p>..</p>

<pre><code>    protected void onActivityResult(int requestCode, int resultCode, Intent data) {     
    Intent intent2 = new Intent();
    if(requestCode == TAKE_PHOTO_CODE &amp;&amp; resultCode == RESULT_OK){

        intent2.putExtra("Filename", datetime);
        setResult(RESULT_OK,intent2);
    }
    else setResult(RESULT_CANCELED,intent2);
    finish();           
}
</code></pre>

<p>..</p>

<p>thank you for your help</p>
