Aia with 500 (text) files in the assets / File.Exists_scope

I tried to open a project with 500 text files in the assets.
This doesn’t work with AI2 or Kodula(r)*, but it works with Niotron.

But Label1 and Label2 return → false:
(File.ReadFrom works !)

manyAssetsNio.aia (67.2 KB)

(*) Q: Why it is not allowed to use this?

2 Likes

Hello @Anke ,
May you re-export the AIA and upload here? Seems like the current AIA you gave is corrupted.

1 Like

Yes, I had imported this aia from Kodula (r) and got the same problem. So I restored these blocks in Niotron and exported the project. However, when I re-import this project I get the same problem again (that the blocks are ejected / corrupted).

grafik

1 Like

Here is the APK:
manyAssetsNio.apk (4.6 MB)

2 Likes

You cannot modify a corrupted project by blocks editor in appinventor…it would be unsaved so it’s better to start a new project

1 Like

Wait, i will have a look and tell you :+1:

1 Like

Yes, I get the same problem on AI2 (after removing all assets exept 2 of them (test1.txt and test500.txt) and importing the project from Niotron:

1 Like

I tried it, I think the issue is in ‘Exists’ block Due to new API 30 update so it’s not able to detect the file.
It should be fixed in next patch.

500 Assets in project is not causing any issue.

2 Likes

Here it is:
manyAssets_new.aia (76.2 KB)

1 Like

Yeah, that’s great.
This was my first time building an app with Niotron. What is the aia limit here?

1 Like

There is no limit in aia, the limit is in asset(1 mb each) and apk size(10 MB) max but it can be increased with subscription.
And you can have unlimited projects in account.

1 Like

Btw, I tried to save a text file with the File component in the shared storage or to copy a file from the assets to the shared storage. Both fail (the app crashes). Same problem as on the AI2 test server.

E.g.:
grafik

See also here:

2 Likes

We would fix the issue soon :+1:

2 Likes

I would really like to know whether it is basically possible on devices with Android ≥ 10 to save and / or read a → non-media file in shared storage (e.g. /Documents).

Maybe you can answer this question in advance.
Thanks.

1 Like

Well Yeah, I was able to fix that block(not available publically yet).

I tried these blocks in a device with Android 10 :

The files are copied without any issue without Write Storage permission, but it’s saved in Download folder like this :

So overall, I would say it’s possible.

2 Likes

That sounds great.
Thank you!

Would it be possible to post the Java code or a test APK so that I can test it on different Android versions (especially Android 10 and 11).

2 Likes

Is there an (approximate) date when the new update will be available?

1 Like

Yeah, as it’s just a bug fix I can share the app.

base.apk (4.6 MB)

This uses ‘shared’ app scope, so it should not work below android 10 though (according to what I seen in appinventor sources).

Around This week.

2 Likes

I checked it on Android 11 (Pixel 2XL):
There is no file in /Documents:

But the folder /Documents in the ASD is created. But there is also no file (copied).

1 Like

Check the public Downloads/Download folder of the device

1 Like