I want to write a code in kotlin (android11) that opens the internal storage directory so that I can select a pdf file from that directory. But due to restrictions, I can't do this.
Please suggest to me a way to do this. Thanks in advance.
I want to write a code in kotlin (android11) that opens the internal storage directory so that I can select a pdf file from that directory. But due to restrictions, I can't do this.
Please suggest to me a way to do this. Thanks in advance.
requestLegacyExternalStorage
is always false in API 30 if
preserveLegacyExternalStorage
is set then requestLegacyExternalStorage is true (this is a pure migration case and this state won't be preserved should the user uninstall/reinstall the app).