Testing the next release of MIT App Inventor (nb187)

It basically seems to work. I received a test APK (from Krish Jha - Niotron team) that copies a text file from the assets to /Download or /Documents (of course without WRITE permission, which is no longer available on Android 11).

  • /Download and
  • /Documents

are the ONLY two folders where this works. (even /Downloads does NOT work!)

Tested on a Pixel 2XL (Android 11).

I don't think this has anything to do with SAF.

1 Like

Did you test with the APK?
If so, remove this file /Documents/test1.csv from your device and try again to save this file:

It will no longer work ...

Yes, all work in Documents. button5
APK removed. This community does not allow posting of apk files in our threads.

Here is a test app that saves a text file in the β†’ /Download and β†’ /Documents folders (without WRITE permission, as this is no longer available on Android 11).

Note: The file names have to be changed with each button click, otherwise it will only work as long as no file is manually deleted from /Download or /Documents.

Steps to test the app (especially on Android 10 and 11):

  1. Install the APK and test ... it will work.
  2. Unistall and reinstall it. Now it does no longer work.
  3. Then check the CheckBox and try again ... it should work again ...
Blocks

This behavior is really strange.
Especially because I don't use any method regarding "shared storage" (FileScope.Shared).
Maybe @ewpatton can say something about it.

No, it doesn't work (Pixel 2XL, Android 11).

@Chudesa_Bojii Try my APK, then you might understand.

Samsung s10, android11, work

1 Like

Now uninstall the app and try again.
It shouldn't work until you check the CheckBox.

Not read after uninstall, only jpg and etc media. Need permission for files

On Android 10+ you can no longer ask for WRITE permission, because this is no longer availably.

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

Need this permission, how solid file manager

	android:name="android.permission.MANAGE_EXTERNAL_STORAGE"


Thanks Anke,
I noticed that and tried to ask read permission, but this only work when defaultFileScope set to legacy.
Where is the documents for file scope block?

Worked add manifest) :slightly_smiling_face:
Please, do NOT post apk files in the community at all.

Yes, I mentioned that several times, e.g. here.
Whenever you need READ / WRITE permissions for devices with Android 4.4 up (API 19+ / KitKat) you must set defaultFileScope = Legacy to get READ / WRITE permissions declared in the Manifest.

The same with Niotron.
But on Android 10 there is no problem with deleting files from /Download and /Documents or after uninstalling / reinstalling the app. These issues are only present on Android 11.

thank you for your tests...

did this work on the AI Test server or only in Niotron?

toFileName cannot have slash in starting

(taken from the Niotron thread)
What is the block Material_Textbox1.Text block about? What is its content? An empty string?

this will not help (except your app is a file manager app or similar), see also μ €μž₯μ†Œ 기기에 μžˆλŠ” λͺ¨λ“  파일 관리  |  Android 개발자  |  Android Developers

the app's usage of the permission must fall within permitted uses, and must be directly tied to the core functionality of the app. If your app includes a use case that's similar to the following examples, it's likely to be allowed to request the MANAGE_EXTERNAL_STORAGE permission:

File managers
Backup and restore apps
Anti-virus apps
Document management apps
On-device file search
Disk and file encryption
Device-to-device data migration

see also Use of All files access (MANAGE_EXTERNAL_STORAGE) permission - Play Console Help

Taifun

1 Like

First I got the same result with Niotron as with AI2 (app crashed).
Then I got a an APK after this issue was fixed by from Krish Jha (Niotron team).
Did you test this APK?

Btw, what do you think about this?

@SteveJG No reason to remove my link to this APK (on the Niotron forum)!

Have they given any insight into how they addressed the crash? An APK is of somewhat limited value here.

it's not a link,what you posted is the apk. :cry: