Testing the next release of MIT App Inventor (nb187)

  1. If the file "foto.jpg" already exists in the folder /Download then it is possible to copy it to "foto.jpg" or → foto2.jpg:


    grafik

  2. If "foto.jpg" does not exists in the folder /Download:


    grafik

No, un- / reinstalling Companion app doesn't change anything.
It behaves in exactly the same way - as described above.

But if I create the APK and run it, it is (of course) not possible to write (save, copy) to /Download (because on Android 11, targetSdk=30), WRITE permission is ignored - does no longer exists).

So for the Companion app WRITE permission might be declared this way (to avoid this issue with Companion):

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />

as I already I mentioned here:

We have updated http://ai2-test.appinventor.mit.edu.ezproxy.canberra.edu.au/ with some new fixes based on earlier reports. Thanks for everyone who has reported issues so far.

Bug fixes:

  • Fix an issue where closing the ListPicker caused a stack overflow (@MohamedTamer94)
  • Fix issues related to the updated behavior of the File component
  • Fix typeblocking for some dictionary blocks
  • Fix a bug related to the TableArrangement
  • Fix a bug preventing assets and extensions from loading properly in the companion
6 Likes

Again: Listing of the assets does not work (tested with the APK):

So please show the block(s) how to list the assets.

Note:
You don't have to be a prophet to predict that there will be chaos after the update if even seasoned users have trouble understanding the new filesystem.

Try it with an empty textblock as directoryName
Edit: the old logic // for assets is now obsolete...
Taifun

1 Like

Light slowly comes into the dark: :wink:

grafik

3 Likes

Were helper blocks tested with extensions? Because I am getting an error.

I am using the UCR source to build the extension

1 Like

You already suggested it in post #27

now there are three four posts cluttering up the topic.....

Ok, sorry, as no one had answered me I didn't know if you had seen it, I'm really sorry.

Here's an example where I copy files from the assets to the app private directory. You could also use the private directory, but that's more complicated to verify. This worked in both the companion and APK on a Samsung tablet running Android 10.

HelloPurrAssets.aia (186.0 KB)

Tested on Android 11, Companion:

Since I don't have the ability to upload to GooglePlay I had to extract the apk from aab file..

Player component doesn't play sounds from assets, neither do I get any error.

Can someone confirm this.
MusiPlayMIT.aia (3.4 MB)

P.S. It works if build as apk..

1 Like

Obviously the same problem as Kodular.

Did you also check this with the TaifunPlayer?

Just tried and neither does Taifun's player work but this one at least tells me that it can't load audio file..

Thanks for the AAB reports. I've put it on my calendar to look at it this afternoon. If I had to guess, my first thought is that the assets are ending up in a different location when the APK is reconstructed from the AAB than where App Inventor puts them by default in the APK structure.

5 Likes

As I said earlier, there is the same problem with Kodular.
But why does the ExoPlayer work there (if the assets are in a different location)?

@Diego from Kodular implemented the AAB support as a GSOC project last summer. Kodular has had it merged into their system for a longer period of time. As for ExoPlayer, I'm not particular familiar with how it is implemented so I can't really answer that.

3 Likes

If it helps, the extracted apk was decompiled with apktool, edited apktool.yml file and added - mp3 to it, compiled..

Afterwards it worked

P.S. that line exist in apktool.yml file if APK is decompiled..

1 Like

Btw, what about this issue (copy a file from the assets to the privateDir)?
@ewpatton

@Boban I think I have a lead on how to fix the asset issue. I'm not sure that I will have it done tonight but I do think I'm close to getting it working.

@Anke I will take up your private file issue next, but if I understand what is happening correctly you may need to change the Scope property from App to either Legacy or Private.

2 Likes