title: save file in debugging file in android
body: <p>I'm new to android and I would like to save an image to disk someplace for debugging.</p>
  
  <pre><code>  String path = Environment.getExternalStorageDirectory().toString();
  
    FileOutputStream out = new FileOutputStream(path + "/android.png");
    bitmap.compress(Bitmap.CompressFormat.PNG, 90, out);
  </code></pre>
  
  <p>When I do this I get a permissions error when I try to save. What Am I doing wrong?</p>
  
  <p>03-29 17:06:32.328: WARN/System.err(2276): java.io.FileNotFoundException: /mnt/sdcard/android.png (Permission denied)</p>