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) (with READ
permissions).
This should work on all Android versions, especially with Android 9, 10, 11.
Version 1 (Oct 25, 2020) → AI2 version (→ use only with AI2):
de.bodymindpower.InstallAPK.aix (9.1 KB)
Blocks - version 1
Note: The → InstallAPK.Install_pathAPK
← block works only with the compiled app (APK).
Version 2 (Oct 28, 2020)
de.bodymindpower.InstallAPK.aix (9.6 KB)
You can now create the /Download
dir in the ASD:
/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/Download/
and also subfolders in this dir, e.g.:
/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/Download/myAPKs/
Version 3 (Nov 1, 2020)
de.bodymindpower.InstallAPK.aix (12.9 KB)
→ DownloadCompleted
event added.
Update v6 (May 3, 2022):
de.bodymindpower.installApk.aix (11.2 KB)
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
added to Manifest.
With version 5 there seems to be a compiling issue with some special extensions. This has been fixed in version 6. In addition, two new blocks have been added to check if the APK has already been downloaded (exists) and to delete the APK again after downloading. (This version was now compiled with Rush.)