Error uploading assets

Hmmm, I thought, let me come up with a workaround and setup a download of the required assets from an online server. Nope, the Web component is also blocked because of the SSL. (you can fix this in a webview due to the SSL tick box, but you cannot then download a file to the app without extensions)

In England, we would call this a buggers muddle!

Something needs sorting out for pre Android 7.1.1 devices, in order to allow assets and downloads to work. The advice provided for getting a certificate was not helpful for the average developer/user here, and not really practical.

On top of that, you can't even import or use an extension.

Thank you for looking into this.

My workaround is that I use the companion during development with a newer android and only try on my android 5.1 from time to time by building an apk and installing it (just to make sure it is compatible with older devices and on smaller screens).

That was my next question. Everything works OK if you compile and install the app on 5.1 ?

Yes. I just tried to copy the image "Anke_125.jpg" directly to the my test device /storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/AppInventor/assets/Anke_125.jpg after removing it from the assets.

This way I can use it also with Companion.

Unfortunately, the same trick doesn't work with extensions.

Yes, as far as I can tell everything works OK after compiling and installing on my android 5.1 (although I do not use extensions, only two images as assets).

As @Anke suggested, the workaround is to copy the two images into the Companion assets folder, then set these as your images in your app:

OK, I have reproduced the problem. I also have a fix. In an upcoming Companion release (likely later this week) we will install the needed security certificates. I have tested the fix in the Android Emulator under version 6.0

2 Likes

The fix is now in the ai2-test companion which you can get from ai2-test.appinventor.mit.edu. Alternatively, you can directly download it here. If you use it with the production systems (ai2, code) you will receive a version compatibility warning. Just click "Not Now" and it should work fine.

You can download it here or use this QR Code:

Tested OP's example aia with updated companion on Samsung Galaxy A3 (Android 6.01), everything works as expected :+1:

I also tested it on my android 5.1.

I get a popup window:

After clicking “Not Now”, everything works fine.

I did not check this on the newer androids.

Thank you for the fix!

The popup is to be expected. It will go away when we release the version of App Inventor that is matched to that companion.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.