Here's what caused the crash:
The TaifunFile extension doesn't automatically request storage permissions, and for good reason. In this case, however, READ permission is required and must therefore be requested manually.
To check this, open the app's settings and enable storage permissions and restart the app.
It works, plays correct song picking either way. However, it only works the first time you open the app. If you close it and open it again there is no list.
It only works after the very first time you accept allowing external files. You can search and pick as much as you want and it works. If you close it, it no longer works.
That's because it's only a snippet to prove the List and List + Search, not a complete solution - for example, it's also not creating it's own folders in the Music folder, and it's not loading a cue-instruction file when it loads a music file.
For it to work every time, it's necessary to store the state of permission in TinyDb. On App start, that record is checked - if permission = false, request it, if permission = true, list the files directly.
If you don't get this logic, I can expand the snippet for you later - got to do a couple of things around the house now
I understand that you say it is necessary. Why has it not been necessary for anything I have done in the last three weeks that accesses the the external storage. Is it because this accesses the internal storage?
I checked it is reading only the internal folder Music.
So, here is the code, expanded to 'know' if read permission is already granted or not.
Since we do not want to build test every little change, especially when working on a main App rather than a snippet, we can add a Boolean condition (manually switched in the Blocks) to build the code for an APK test or a Companion Test:
You should definitely formulate your questions more precisely, show the blocks and post the aia. Your topics get out of hand (as so often) and most people - at least I - lose track of what's going on at some point.
As soon as we solve one of your problems, the next problem comes up. This is frustrating for both sides.
So specify what exactly it is about
describe the goal and the steps in detail
name the Android versions (on which it should work)
show what you have already tried (blocks)
post the aia
explain where the files to be listed are located (especially the non-media files)
If the app should also work on devices with a removable (micro) SD card, explain whether it should only work there or also on the built-in storage.
If non-media (e.g. txt, pdf, html) files should also be listed, be aware that this is not possible without SAF or MANAGE_EXTERNAL_STORAGE permission on devices running Android 11+ (at least not if they are not in one of the Shared folders).
Note: This permission will most likely not be allowed by Google in case the app is going to be published on the Play Store.
As I can see from your last post (html example - post #36 by the way), it seems to be about a dance instruction. Why don't you tell us that right at the beginning?
That's a handy extension to determine the API number (cross-ref this to the Android version number). There is no point in requesting the MANAGE_EXTERNAL_STORAGE permission if your App is to be distributed via Google Play.
Anke, I have cut Richard some slack because he got confused with all the different lines of advice. Most importantly, as in this case, Richard believed the Project should define the App in a certain way but didn't realise it would be difficult for Users to contribute their media. He also did not know for example that only one List Picker would suffice to select related files (Music and Cue files).
Sometimes people ask how to do something but that something can be far from the best solution - but they get several responses on how to do it the way it should not be done
I see the HTML file was produced with Serif Web Plus. There is a reason why Serif ditched that program - it would need to be completely re-written. For example, it does not cater for today's vast range of screen sizes and resolutions, it creates hard-coded sizes (in HTML 4, now superseded by HTML 5).
So I attach an edited version of your Fiddlesteppers Polka file, making it responsive (auto adapt to the screen size/resolution).
You can test HTML files for standards compliance on this site:
So you are probably thinking "How can my App Users make their own HTML Cue files?". Since the basic format of the cue files is the same, the App can present a form for the User to fill-in, and then auto-create the HTML file from their info. It can present the file names list to pick from to ensure the Cue file gets an identical name.
Note, the filenames of the Music files and the Cue files must be identical except for their extension, for the App to work as expected.
For now, both sets of files should be directly in the Android Music folder.
Here is the expanded snippet code, which loads both files. By default, it's set to run via the Companion. Change the APK variable to 'true' to run as an APK.