title: Android - ask write to SD card permission dialog
body: <p>I am having trouble gaining write access to device SD card root directory. I can write to device internal storage and app package folder in an SD card without problems. I found that gaining access to an SD card is possible using Storage Access Framework, so I looked at other apps to see how they gain access to an SD card, and found Total Commander with its neat permission dialog.</p>
  
  <p><a href="https://i.stack.imgur.com/Rgtof.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Rgtof.png" alt="write to SD card permission dialog"></a></p>
  
  <p>How to show such a dialog because I cannot find any examples? My goal is to store large files on the SD card that stay after uninstalling the app.</p>
  
  <p>Similar questions:</p>
  
  <p><a href="https://stackoverflow.com/questions/43349110/android-write-on-external-sd-card-java-io-ioexception-permission-denied">Android (Write on external SD-Card): java.io.IOException: Permission denied</a></p>
  
  <p><a href="https://stackoverflow.com/questions/43066117/android-m-write-to-sd-card-permission-denied">Android M write to SD Card - Permission Denied</a></p>
  
  <p><a href="https://stackoverflow.com/questions/36862675/android-sd-card-write-permission-using-saf-storage-access-framework">Android SD Card Write Permission using SAF (Storage Access Framework)</a></p>