title: How to open SAF (Storage Access Framework) to select storage?
body: <p>How to open SAF (Storage Access Framework) to select storage as in the picture? <a href="https://i.stack.imgur.com/uJIFf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uJIFf.png" alt="enter image description here"></a></p>
  
  <p>I tried:</p>
  
  <pre><code>Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
  intent.putExtra(DocumentsContract.EXTRA_PROMPT, "Select path to save");
  startActivityForResult(intent, PICK_FOLDER);
  </code></pre>
  
  <p>but this opens only <code>Recent</code> and user have to click to <code>...</code> and <code>Show Internal Storage</code> and after that select for example <code>SDCard</code> or <code>Internal Storage</code>. That's not user friendly. </p>
  
  <p>Is there any way to open view as in the picture or not?
  There is extra data to Intent <code>DocumentsContract.EXTRA_INITIAL_URI</code>, but what value can I add it to show open view as in the picture?</p>
  
  <p>I can direct open <code>primary storage</code> via:</p>
  
  <pre><code>StorageManager sm = (StorageManager) getSystemService(Context.STORAGE_SERVICE);
  if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.Q) { //From Android 10+
      startActivityForResult(sm.getPrimaryStorageVolume().createOpenDocumentTreeIntent(), PICK_FOLDER);
  }
  </code></pre>
  
  <p>but I would like to open view as in the picture.</p>