I simplified my example blocks a bit (without using TaifunFile ext):
download the APK from Google Drive to the /Download (default) folder and copy it to ASD
install AKP from ASD
Of course you need the WRITE permission for this, since the download component always downloads to the standard folder (/storage/emulated/0/Download).
To avoid this, you need to use an extension that also allows you to download a file to a specific folder. I only know that the Download extension from our beloved can do that. Maybe someone has a better suggestion.
Seems like Kodular uses preset dir.
Download Manager’s documentation says that file will be saved in dir specified using setDestinationInExternalPublicDir method so you can save file in external storage in any dir.
Staff can clarify our doubts.
thank you for your contribution…
does the extension also work in the companion app as well as in App Inventor?
and if you like to follow the naming conventions, then please start the extension name with a capital letter… InstallApk or InstallAPK would be the correct name according to the conventions…
It does not work with the Web component because the APK file is corrupted with your procedure after downloading.
I found a way to do it with the Web component only. But in this case you must ask for WRITE permission, because the Web component enforces that, even when downloading to an ASD (shouldn’t be like this!).
See here (works with Companion, of course without asking for WRITE perm.): installAPK2.aia (41.4 KB)
That depends on how you use the extension. If you use the Download component, the permission will be requested automatically. If you put the APK in the assets (and copy it to ASD), no permission is required at all.
Here is an new version of the extension.
I added a Download method (thanks to @vknow360 for support!) with that you can download an APK (or whatever file you like) to the App-Specific Directory (ASD) and install it (without WRITE / READ permissions): de.bodymindpower.InstallAPK.aix (9.0 KB)
I also followed the naming conventions, which @Taifun pointed out.