title: Permission denied but I have permission access
body: <p>I already put a permission access on my manifest still not saving. I tried this yesterday and its saving my image and now I cant. I dont know what is the problem here. logcat says java.io.IOException: open failed: EACCES (Permission denied)</p>
  
  <p>below is the code</p>
  
  <pre><code>    save.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
          RelativeLayout content = (RelativeLayout) findViewById(R.id.dashBoard);
          content.setDrawingCacheEnabled(true);
          Bitmap bitmap = content.getDrawingCache();
          File file = new File(Environment.getExternalStorageDirectory().getPath()+ imagename+ ".png");
  
          try {
              if (!file.exists()) {
                  file.createNewFile();
  
              }
              FileOutputStream ostream = new FileOutputStream(file);
              bitmap.compress(Bitmap.CompressFormat.PNG, 10, ostream);
              ostream.close();
              content.invalidate();
              Toast.makeText(getApplicationContext(), "SAVED", Toast.LENGTH_SHORT).show();
          } catch (Exception e) {
                  e.printStackTrace();
  
          } finally {
              content.setDrawingCacheEnabled(false);
          }
      }
  });
  </code></pre>
  
  <p>here is the full logcat
  <a href="https://www.dropbox.com/s/dlb6p5i1nd1kxua/Logcat.txt?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/dlb6p5i1nd1kxua/Logcat.txt?dl=0</a></p>