Taifun File extension - Android 11

Post a test aia.
Did you test with Companion or APK?

Connect to Companion → right mouse click on this block → Do it

grafik

and post the result.

I have done the tests with the APK.
I have put here the aia file so you can see it because I can't find the solution.

Thank you very much for your help
ListPicker.aia (33.8 KB)

Where is it?
And post the result of → Do it.

The result is the same.

List_Picker.aia (33.8 KB)

That's why I asked you to post the result of Do it.

Add this block to your app:

The TaifunFile extension doesn't ask for this permission automatically (for some good reasons).
See the documentation of Taifun's extension.

TaifunFile documentation → permissions

Also @Toni should make sure that the dir exists.

This dir

/storage/emulated/0

and its subdirectories (/Download, /Documents, /Music, ... exist on all devices and Android versions:

grafik

Maybe but I can delete those dirs on my phone.

But even then, i.e. if all subdirectories have been deleted, there should be no runtime error.
He has to ask for READ permission to get rid of this error.

But there should not be any issue if I don't ask for read and write permissions on KitKat and Lollipop, still I have got that error on these versions, when I was newbie to app development.

No, on devices with Android < 6 all permissions (also dangerous permissions like READ_/WRITE_EXTERNAL STORAGE) are granted at install-time. (So no need to ask for them. The permissions must only be declared in the Manifest. And that is the case with the TaifunFile ext.)

I checked it on device with Android 5.0. No issue.

1 Like

Sorry, I've been without a mobile phone for a while due to a problem with the audio and I haven't been able to try.
Anke Thank you very much!
Now it works for me with android 11. The question now is that the app must work on andoid 9, 10 and also 11. How do I make it detect the version and put the path /storage/emulated/0 or /mnt/sdcard/?

grafik

And see here: How can I make it so that music (mp3 files) can be played from the external SD card, whether directly or indirectly?

A post was split to a new topic: Failure in audio reproduction

sorry, I just have seen this thread...
what happens, if you use a relative path to the root directory, i.e. an empty string?
see also the documentation about how to use the extension...

so what exactly was the solution to your problem? To ask for READ_EXTERNAL_STORAGE permission?

Taifun
PS: I moved to your new question to a new topic, because it is something completely different...

A post was split to a new topic: Taifun FileList method not showing all the files in shared storage