title: Can't write in external storage
body: <p>I want to create a file in external storage but I can't. There is no error, but there is no creation. I got the permission in manifest before.</p>
  
  <p>I am following the simple code below:</p>
  
  <pre><code>package com.example.nima.readwritefiles;
  
  
  public class ExternalActivity extends AppCompatActivity {
  
      File extDir;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          extDir = Environment.getExternalStorageDirectory();
          File file = new File(extDir , "mydir");
          if (!file.exists())
              file.mkdirs();
  </code></pre>