title: saving file on sdcard with permission error
body: <p>After countless searching I've managed to find path to my sdcard not the android emulated storage. But when I try to make .txt folder there it ends up with error</p>
  
  <pre><code>/storage/37F0-1515/DCIM/100MEDIA/test.txt: open failed: EACCES (Permission denied)
  </code></pre>
  
  <p>I don't know why because I have permissions for </p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
  </code></pre>
  
  <p>and also I've enabled the permissions with</p>
  
  <pre><code>if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
          ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, request2);
      }
  </code></pre>
  
  <p>Here is the code that I'm using</p>
  
  <pre><code>    File sdCard = new File("/storage/37F0-1515/DCIM/100MEDIA");
      File dir = new File(sdCard.getAbsolutePath());
  
  
      if (!dir.exists()) {
          dir.mkdirs();
      }
  
      final File file = new File(dir, "test" + ".txt");
      try {
          BufferedWriter bufferedWriter = null;
          bufferedWriter = new BufferedWriter(new FileWriter(file));
          bufferedWriter.write("test");
          bufferedWriter.close();
      }
      catch(Exception e){Log.v("myApp", e.toString());}
  </code></pre>
  
  <p>I don't know why android won't let me write to sdcard. Do I need some other permissions ?</p>