I am migrating my app over to Scoped Storage and have included the preserveLegacyExternalStorage="true"
flag in the manifest. I would like to know if there is some way to test if the app is using legacy storage or not. Part of my app's functionality depends on legacy storage, and simply changing it to scoped storage will break it, regardless of the flag in the manifest, so I need some way to detect legacy storage, or at least switch to scoped storage if legacy storage fails.
Asked
Active
Viewed 69 times
0

Pink Jazz
- 784
- 4
- 13
- 34
-
Environment.isExternalStorageLegacy(). – blackapps Dec 07 '21 at 16:01
-
Hope this answer can help you https://stackoverflow.com/a/58451482/9942608 . – Himanshi Thakur Dec 17 '21 at 05:46