title: How to create new folder in sd card by using Storage Access Framework?
body: <p>I would like to know how to use "Storage Access Framework" to create new folder on SD card. If you give me the code it would be very good.
  I have already searched other questions and answers but not found how to.</p>
  
  <p>Add some codes that already work per "CommonsWare" answer.
  Note that is the only way I found that it can make new folder in sd card on my phone SS A5 with Android OS 5.1.1</p>
  
  <pre><code>    public void newFolder(View view)
      {
          Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
          startActivityForResult(intent, NEW_FOLDER_REQUEST_CODE);
      }
  
      private static final int NEW_FOLDER_REQUEST_CODE = 43;
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent resultData) {
          super.onActivityResult(requestCode, resultCode, resultData);
  
          Uri currentUri = null;
  
          if (resultCode == Activity.RESULT_OK)
          {
              if (requestCode == NEW_FOLDER_REQUEST_CODE)
              {
                  if (resultData != null) {
                      currentUri = resultData.getData();
                      DocumentFile pickedDir = DocumentFile.fromTreeUri(this, currentUri);
                      DocumentFile newDir = pickedDir.createDirectory("MyFolder");
                      textView.setText(newDir.getName());
                  }
              }
          }
      }
  </code></pre>