No, saveTestFile_API30.apk
can no longer grant WRITE
permission, but READ
. (Non-media) files must have been created by the app in order to be able to access them. And this was the case with saveTestFile_API29.apk
. Therefore, they are still accessible after the update.
Files created with SDK = 29 can be accessed from SDK = 30.
So nothing will change with update for existing files.
Try to Clear storage in the app settings and check again ...
... SDK ≤ 29 ...
Hmmm...no "aha" moment for me.
I want to put files in my Download or (Downloads) folder from my computer, and then use those files in apps that I make with AI2. This is what I believed "Shared" scope was all about...
That's sad.
This will not work (even not when shared storage is correctly implemeted).
The app must have created those files.
Maybe, but you're wrong.
Когда закончите тестировать и обновите версию app invertor ?
Or not ?
and last bullet point of Section 2.1 here:
Did I say that my simple app (webviewer and two html files in /Download folder) works in companion on the test server - the test server companion must have permissions given....
OK, this only shows "media" files that exist in /Download, e.g. .png or .mp3. This is stated in the device Settings permissions also: "Allow access to media only"
It did ask me to grant permission on first run
Does not display web page get ERR_ACCESS_DENIED.
As I said several times:
.. that are not created by the app.
It is possible to read files on the external storage if you set the scope to Legacy, which will grant your app the READ/WRITE permissions in the manifest. Outside of the Legacy scope though, you have to abide by the new rules.
Write permission is no longer respected on Android 11, even if it appears in the manifest, per Storage updates in Android 11 | Android Developers. We'd have to add the new permission for managing all files. I don't anticipate that we will do this in App Inventor, but extensions may decide to provide this.
Shared scope will use the MediaStore for reading files rather than reading them through the standard file system. I'll need to double check, but I think this does not require the READ_EXTERNAL_STORAGE permission. If it turns out that this is still necessary, we will add it back for the Shared scope.
Apparently, it is implicitly assumed that if
DefaultFileScope
is NOT set to Legacy, only files in the ASD (or, if applicable, the shared storage) should be accessed. So again: Why shouldn't it also be possible to access the external storage on devices with Android 4.4 and up? (e.g. withDefaultFileScope = App
)
Because that's how I chose to define the different scopes. If you want to access files outside of the ASD, use Legacy and you will get the READ/WRITE permissions. If not, use any of the others, as appropriate. The Legacy option serves as an escape hatch out of the new restrictive permission model (as best we can give within Android/Google's constraints).
But legacy mode does not work on Android 11 other than for "media" files
Legacy scope though, you have to abide by the new rules.
I think there is no forbidden reading from outside of asd in the new rules. Google does not prohibit the use of the Read permission. If the app requires it, it is possible. The new rules are mainly more restrictive when it comes to writing outside of asd. As for reading, it should also be available for android 11 so that the behavior is identical for new and old android versions.
I'll have to verify that, although given our experience with Google I wouldn't rely on that assumption going forward to future versions of Android.
As for reading, it should also be available for android 11 so that the behavior is identical for new and old android versions.
No, as I have said so often, on devices with Android 10+, non-media files are only accessible if the app has created them itself.
Apparently nobody seems to have read this thread completely and especially my statements, and hardly anyone seems to have tested my test APKs. Otherwise such statements would not come.
@ewpatton Sorry, but there is nothing new in your answers, I have already explained all that myself. This can also be seen in particular from my test APKs.
Btw, of course I only used DefaultFileScope
= Legacy in my test APKs and other tests (because it's the only way to get permissions for testing with APK).
Apparently nobody seems to have read this thread completely and especially my statements, and hardly anyone seems to have tested my test APKs. Otherwise such statements would not come.
Read them, tried them, understood them. But the documentation from Google / MIT indicates otherwise until they confirm this is not the case.
Read them, tried them, understood them. But the documentation from Google / MIT indicates otherwise until they confirm this is not the case
Yes indeed. I refer to the links I provided earlier in this topic.
I refer to the links I provided earlier in this topic.
However, what do we learn from them?