In a previous thread I ended up solving a File.ListFiles problem under API 29 by adding
to my manifest editor.
Erel's recommendation, as stated in https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/ , is
So what's the best way to handle downloaded files that arrive in the /Download folder (via emails, Google Drive downloads, etc) in API 30, which at some point we'll be forced to use? API 30 will not recognize "requestLegacyExternalStorage." As I encountered in my previous thread, not having that manifest option will cause non-media files (like KML files) to be invisible in File.ListFiles. How then would we access those files so that we could move them to File.DirInternal or RuntimePermissions.GetSafeDirDefaultExternal?
B4X:
SetApplicationAttribute(android:requestLegacyExternalStorage, true)
Erel's recommendation, as stated in https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/ , is
It will not work with targetSdkVersion=30. Avoid using File.DirRootExternal. Either use File.DirInternal or RuntimePermissions.GetSafeDirDefaultExternal.
So what's the best way to handle downloaded files that arrive in the /Download folder (via emails, Google Drive downloads, etc) in API 30, which at some point we'll be forced to use? API 30 will not recognize "requestLegacyExternalStorage." As I encountered in my previous thread, not having that manifest option will cause non-media files (like KML files) to be invisible in File.ListFiles. How then would we access those files so that we could move them to File.DirInternal or RuntimePermissions.GetSafeDirDefaultExternal?