scoped-storage

Test programmatically if in Android 10+ the legacy external storage access is disabled

怎甘沉沦 提交于 2019-12-05 04:32:57
Is there a simple API call that would tell me if an app running on Android 10 or later must use Scoped Storage access, that is, if the normal file access, a.k.a. "Legacy External Storage" is disabled? Note that even if the app in AndroidManifest.xml, section declared: android:requestLegacyExternalStorage="true" the file access may still be denied due to Google policy changes in the future, so testing this value is useless. The only way I found is to test if the external storage root directory is readable, but for that, the app must first ask for Storage permission, which is useless for

How to get information of an APK file in the file system (not just installed ones) without using File or file-path?

南楼画角 提交于 2019-12-03 09:18:14
Background My app ( here ) can search for APK files throughout the file system (not just of installed apps), showing information about each, allowing to delete, share, install... As part of the scoped-storage feature on Android Q, Google announced that SAF (storage access framework) will replace the normal storage permissions. This means that even if you will try to use storage permissions, it will only grant to access to specific types of files for File and file-path to be used or completely be sandboxed (written about here ). This means that a lot of frameworks will need to rely on SAF

How to get information of an APK file in the file system (not just installed ones) without using File or file-path?

三世轮回 提交于 2019-11-27 17:05:31
问题 Background My app (here) can search for APK files throughout the file system (not just of installed apps), showing information about each, allowing to delete, share, install... As part of the scoped-storage feature on Android Q, Google announced that SAF (storage access framework) will replace the normal storage permissions. This means that even if you will try to use storage permissions, it will only grant to access to specific types of files for File and file-path to be used or completely