The reason why I now added the privateDir will soon become clear when I show you how to store any kind of files in → internal storage (and not just text files like the File component does).
I think this is a milestone (at least for me):
I am very happy that this is (now) possible, because I can bypass the problems that will arise when Google only allows AABs (and no longer allows APKs, Aug. 2021 for new apps). Because I have to pack all my media files and other sensitive data in the internal storage to avoid that users (without root access) can access them (and decompiling in order to build a big app does not seem to be possible with AABs).
And I know from many posts in the AI2 and Kodular forums that many others feel the same way. E.g. → @HeyAveHey
Here are my tests copying images to the private data dir (→ internal storage), tested on:
Android 11, APK, targetSdkVersion=29
Android 11, APK, targetSdkVersion=30
I first downloaded 7 images from my webspace in the ASD and copied them from there to the privateDir without permissions. I also copied one image from the assets to the privateDir: This one:
The other (downloaded) images are pics of a car. (total size of images = 4MB, but 30MB works too)
Of course, I could not use the Image component without READ permission. So I used an extension for this. But I’m pretty sure that the permission request will be removed when Kodular targets Android 11, Aug. 2021).
The maximum AIA size of 30 MB is not enough for my apps. So I have to download the files on the first run, download them to the ASD, copy them to the privateDir and then remove them from the ASD.
We are here on the Kodular community. So please test with Kodular.
When I test something, I basically do it on the original (→ AI2) and on Kodular.
On both of them it doesn’t work with the Web component (and I doubt it works with other distros, regardless of the permissions issue).