title: Problem saving the image in a particular directory in android
body: <p>In my application in android 1.6 I m calling the default camera using </p>
  
  <pre><code>Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  </code></pre>
  
  <p>and mentioning output directory </p>
  
  <pre><code>intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/image.jpg")));
  </code></pre>
  
  <p>This works fine. However, if I replace it by </p>
  
  <pre><code>intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(Environment.getDataDirectory() + "/image.jpg")));
  </code></pre>
  
  <p>the ok (attach) button doesnt respond. I have added the following in AndroidManifest.xml</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.CAMERA"/&gt;
  </code></pre>
  
  <p>How to solve this ?</p>