You cannot use Environment.getExternalStorageDirectory()
for target SDK 31. You should use scope storage.
If you want to use the legacy way, you should have the target SDK 30 (max) and in case it is 30, then you should enable requestLegacyExternalStorage.
* Be the first to Make Comment