title: Android 11 Access other apps Data in Android/media
body: <p>I've an WhatsApp Status Saver app and want to update it cause WhatsApp changed the path. The path I want to access is:</p>
  <p>/sdcard/Android/media/com.whatsapp/WhatsApp/Media/.Statuses/</p>
  <p>Unfortunately Google changed permissions when it comes to Storage Access.</p>
  <p>Is there any way to access the folder with the Mediastore API or the Storage Access Framework?</p>
  <p>I tried this with the Storage Access Framework (<a href="https://developer.android.com/training/data-storage/shared/documents-files" rel="nofollow noreferrer">https://developer.android.com/training/data-storage/shared/documents-files</a>):</p>
  <p>Code:</p>
  <pre><code>openDirectory(Uri.fromFile(&quot;/sdcard/Android/media/com.whatsapp/WhatsApp/Media/.Statuses/&quot;));
  
  public void openDirectory(Uri uriToLoad) {
      Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
      intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, uriToLoad);
      startActivityForResult(intent, 1);
  }
  @Override
  public void onActivityResult(int requestCode, int resultCode,Intent resultData) {
      if (requestCode == 1 &amp;&amp; resultCode == Activity.RESULT_OK) {
      
          Uri uri = null;
          if (resultData != null) {
              uri = resultData.getData();
             
          }
      }
  }
  </code></pre>
  <p>Normally it should open the path to grant permissions but that doesn't work, it opens the last directory. Also it's not possible to select the folder manual because it's hidden.</p>
  <p>Thanks</p>