I have now made an update that should work with all Android versions. The given download link (GoogleDrive) downloads an almost empty APK (only one button, 3.2 MB). But you can also set your own link to your app (APK).
So check that on your devices with different Android versions, especially Android 10 and 11.
installAPK_K.apk (5.5 MB)
Here is the new update.
It should now work with all Android versions (tested on Android 9, 10, 11).
de.bodymindpower.InstallAPK.aix (9.1 KB)
InstallAPK extension for AI2 (→ AndroidX) is now also available and will soon be presented in the AI2 forum. I’ll share the link here later.
→ AI2 version of this extension (
With this extension you can download an APK to the ASD (app-specific directory) and install it. This doesn’t require WRITE / READ_EXTERNAL_STORAGE permissions. However, you can also install an APK from another directory (e.g. the /Download folder)...
Reading time: 1 mins 🕑
Likes: 6 ❤
Note : I forgot to mention that for devices with API < 19 (
KitKat ) you must ask for
“On Android 4.4 (API level 19) or higher, your app doesn’t need to request any storage-related permissions to access app-specific directories within external storage.”
So if your
minSdkVersion < 19 use something like this:
I made a new update (→
Version 4) that now has a →
DownloadCompleted event, among other things. In addition, the → /Download directory can be created in the ASD
and APKs or other files can be downloaded into it. Furthermore, → subfolders can also be created in the
/Download directory of the ASD, e.g.:
or with subfolder:
Wow, nice you are continuously updating and making it better. Nice
There should be blocks for when download started and if an error occurred while downloading. It would be very helpful
No error should occur as long as there is a network / internet connection. You could catch this by querying the
And also what if the app is closed while downloading? does the downloading pause or continue?
please add progress event…
hey, i tried this but its not working. that file is already exist but it still downloading a new file with new name.
i dont know what is wrong
You should debug your blocks. The
File component need needs a
relative path for the
See also here:
I am really not a fan of the File component for these reasons:
The really disturbing thing is the constant alternation between relative and absolute path.
Copying from the assets does not work
Permissions are also requested for the ASD (but this applies to many components, but I’m sure this will be fixed when Kodular targets Android 11, Aug 2021).
It’s really hard to get it working, because there are several issues with the File component:
Sometimes the full path and sometimes the relative is used (see blocks below)
WRITE permission is not queried automatically (only READ), so you have to ask manually for WRITE permission.
Permission granted is not triggered when the app starts for the first time, so you have to reload the screen.
Moreover: the File component can not access the assets with the APK (works only with companion).
Read it this way:
path (of) APK
Thank you for this amazing extension .
I did this and it worked, thank you soo much.
I did this and it worked
Fine, but you can avoid an additional extension (