title: Android 12: can't create new folder in downloads when app is uploaded to Google Play
body: <p>When code bellow as a part of application is executed locally (directly started from Android Studio) it works correct.</p>
  <pre><code>String folderName = Environment.DIRECTORY_DOWNLOADS;
  File folder = new File(Environment.getExternalStoragePublicDirectory(folderName) + &quot;/SampleApp/&quot;);
  
  if (!folder.mkdirs()) {
      FirebaseCrashlytics.getInstance().recordException(new Exception(&quot;Storage access class: can't create folder&quot;);
      Log.d(&quot;Debug&quot;, &quot;Can't create new folder on path: &quot; + folder.getPath());
      return false;
  }
  
  return folder.exists();
  </code></pre>
  <p>The full path where new folder gets created is:</p>
  <pre><code>/storage/emulated/0/Download/SampleApp
  </code></pre>
  <p>But when the same code as a part of application gets uploaded to Google Play and then installed to the same phone, folder can't create and an exception gets triggered. Logged debug path is the same:</p>
  <pre><code>/storage/emulated/0/Download/SampleApp
  </code></pre>
  <p>I get the problem only on Android 12 devices. Has something specific changed from Android 11 to 12? I also tried using <code>mkdir()</code> but end result is the same. Inbetweeen both tests I obviously removed the SampleApp folder, so it doesn't exist when I try app version from Google Play.</p>