FileTools extension issues with Android 10+

Means in detail?

Only regarding this problem?

Also, it refers / as external storage path (/storage/emulated/0).

FileListFrom assets is not working.

What's wrong with that? And what method (block) are you talking about?

/abc.txt will refer to /storage/emulated/0/abc.txt while it should refer to /storage/emulated/0/Android/data/package_name/files/abc.txt

And again, what's wrong with that?

This is exactly how it should be:

It's working fine with the compiled app (APK) (it only fails with Companion).
The same applies to FileTools.Exists fileOrDirectoryName_//foto.jpg

Why should the root directory of the external storage /storage/emulated/0/ be redirected to the ASD with your FileTools extension?
That doesn't make sense in my opinion.

Summarized:
With the compiled app (APK) I currently don't see any problems using the FileTools extension from @vknow360 (not even under Android 10+). But of course you can also try Taifun's File extension: https://puravidaapps.com/file.php.

Because Android 11 does not allow to write outside of ASD.
The extension will stop working on Android 11 as soon as App Inventor targets API 30.

No. Under targetSdkVersion=30 the WRITE_EXTERNAL_STORAGE permission does no longer exist. But that doesn't mean that I can't check whether a file is in the external storage and can be read from there. It should also be possible to copy or move a file from the external storage to the ASD.

If the root directory of the external storage /storage/emulated/0/ is redirected to the ASD it would be no longer possible to do this.

Ok, my whole life was a lie!
I have already wasted two precious days of my life just to get it working.
So, did you mean that external storage is only readable?

Yes exactly. But as I said, it is no problem to read file from there and also copy / move files from there to the ASD (of course needing READ permission).

Btw, maybe you want to adjust the topic. I couldn't think of anything better in a hurry.

Even saving is possible, but requires additional permission.

That's fine. I was about to ask you to split the topic as a pm. But you are fast. :smile:

Yes.But then Google will ask us a lot of questions and at last there will be high chances that the app will get rejected. :grin:

1 Like

Not everyone puts their apps into the google store. You could make a completely separate extension that would allow writing, i.e. an extension that would add appropriate permissions to the manifest. Then using the file extension and the one with additional permission, you could save files in the same way as in older versions of android. Google is not everything.

Yes that's way.
But still Google will put more restrictions in future Android versions.
No consistency. :neutral_face:

Someone may want to do a file manager with ai2, then google probably can't reject such an app.
Yes, they make restrictions for third-party developers every now and then, and they themselves track users and flood them with their ads, earning us millions.

1 Like

... which will not be granted by Google for the vast majority of apps that are created by (normal) users.

1 Like

So I can't create an app that will save files anywhere without sending it to the google store? Not everyone puts apps on the google store, so whether google declines an app or not is an individual problem.
Maybe google will introduce paid certificates, and everyone will be able to buy the option to save files. Google will earn extra money as usual and be satisfied :rofl:.

Something else I discovered during testing.
I need to do some more tests to confirm that.