Working on android Java, recently updated SDK to API level 29 now there is a warning shown which states that
Environment.getExternalStorageDirectory()
i
For Android Q, you can add android:requestLegacyExternalStorage="true"
to your element in the manifest. This opts you into the legacy storage model, and your existing external storage code will work.
...
Technically, you only need this once you update your targetSdkVersion
to 29. Apps with lower targetSdkVersion
values default to opting into legacy storage and would need android:requestLegacyExternalStorage="false"
to opt out.