Install an APK after downloading to ASD - works on all Android versions

Hi @Anke,

Thanks for your extension. I used version 3 of your extension on App Inventor nb188 with Companion 2.62 on Android 10.

the block on my application is like below.

when I call the procedure of installAPK on my App, the download started well, and then it was completed successfully. And I can see the file in the below folder.

/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/

Also, I can say that DownloadCompleted event is started well due to ShowAlert command is giving the below message.

asdPath

But Installation doesn't start automatically. I checked if installation could be start manually to be sure the downloaded file doesn't corrupt. Installation can start if I start it manually.

I would be very grateful if you could help me.

Regards,

Halil

1 Like

I checked it again. After downloading the APK, I see this:

grafik

So where is the problem?

Blocks

1 Like

:sweat_smile:
In my opinion you too are an Expert :grinning:

You've made many many extensions till now :grin:

Thanks @Anke,

Thanks for your quick response. I tried it on the new project. And I tried 2 way.

  • using it by AI Companion

  • Using it by building apk and after installation on the phone.

while it works well by building apk and after installation on the phone, it doesn't work by AI Companion.

Then I used it on my original application by building apk and it worked.

Thanks again.

Halil

Dear Anke,
I'm a young novice student, sorry but it's my first time on this platform and I got a problem with the version 3 of the extension.
I can download the apk but it shows an error, and even if I can find the downloaded apk, I see that also the file's size is wrong so I can't open it.
I've already read similar problems in this community and checked e.g. I linked a file and not a folder..
but I don't know how to make it works.
I share the error screen and my blocks.
Thank you in advance


Did you rename the APK to <yourApk>.png before uploading to Google Drive?

As shown here:

Try this:

grafik

Yes, I've already tried all of them but I've always the same error.
So, if I disable the block with the installation, I don't have any problem downloading the apk and I can complete it, but even if I click on the "Instalar" button, I have the same error.
I think the problem consists in this part of the program, do you have any suggestions?
Hope I was clear

@Claudio_Demaria Try this one:

If it doesn't work for you, which device & Android version?

Please excuse the delay, but finally this apk works! I mean the "installAPK_AI2.apk"..
Can I see the blocks? Thank you very much!

I just updated the extension to version 6 (added two new blocks):

1 Like

I've downloaded the version 6, and now I have this problem.. It can't build the apk