maxkeppeler / sheets

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
https://maxkeppeler.github.io/sheets/
Apache License 2.0
923 stars 77 forks source link

StorageSheet Folder Location #99

Open irvine752 opened 2 years ago

irvine752 commented 2 years ago

I just noticed an issue when I was using the Storage Sheet. It seems to be stuck on this folder -> "/storage/emulated/0/". I can't seem to get any other folder or navigate to some other folder. I did give storage permission to the App.

I'm currently using a Samsung device with an SD Card. I was also using the sample.apk under the sample folder.

enricocid commented 2 years ago

Adding android:requestLegacyExternalStorage="true" to manifest (application level) "fixes" the issue.

Currently directory.listFiles() returns an empty list on Android 10 and above because of the scoped storage enforcement.

I don't know if this can help, but You can "Use the ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION intent action to direct users to a system settings page where they can enable the following option for your app: Allow access to manage all files."

https://developer.android.com/training/data-storage/manage-all-files#all-files-access

See modern storage API too

https://google.github.io/modernstorage/