Listpicker filter bar

Hi Richard, for now, mp3 and Html files directly in the standard Android Music folder (no sub-folders searched). We did this (mp3 only) in the earlier test, which was successful your end.

Also in this test (4), try my Fiddlesteppers Polka 2.html

Tried that, no change. No version has ever found files on the external card. I just tested all again to make sure I was remembering correctly. There is a folder named Music on both internal and external card. The have different named files so that I can tell which is being listed.

  • Music titles 2 found mp3 files on internal using companion

  • Music titles 2 doesn't work APK

  • Music titles 3 found mp3 files on internal using companion and
    switch

  • Music titles 3 found mp3 files on internal using APK and switch

  • Music titles 4 gets Music Folder No music files found message using companion or APK using the appropriate switch.

  • Music titles 4 using get global APK = false in companion,
    finds music files on internal.

Can both of these be true? :thinking:

Remember, the file names must be identical for mp3 and HTML. You do have 2 titles that fit that requirement:

titles

I have tried it a number of times just to make sure I would get the same results. The screenshot, by the way, was done before I put your Fiddlsetppers Polka 2. html in the folders. I have doubly checked that all files are named exactly the same.

The only way I get any files listed in Music Titles 4 is to have get global APK = false set when using companion.

What am I missing? The AI blocks ask for permission to "ReadExternalStorage" but, all of the files that are found, on all versions, have been from internal storage.

To use the html files on Android10 and above don't we need to use this with activity starter android.settings.MANAGE_ALL_FILES_ACCESS_PERMISSION

Since these are non-media files they can only be accessed (read) on Android 11+ if they are in one of the Shared folders /Documents or /Download or the ASD (but not in /Music).

Otherwise the app needs MANAGE_EXTRNAL_STORAGE permission or must use SAF.

See also here:

I understand that from your instruction on other posts. I was asking about this post in order to clarify what I thought I knew on the subject.

My statements apply to every post.

I was asking about why the code shown on this post didn't include that because non media files are being asked for. I can't learn if examples don't seem to show what I thought to be true.

.... It is working on Android 11 Anke. However, Richard is testing on Android 9 and 10.

That is correct Richard. When you pick a music title, does that play?

On Android 11 (html saved in the ASD):

Do you actually need to check if the permission is already granted ?

Just put it in the Screen1.AskForPermission() in the Screen1.Initialize event.

It will ask for the permission only if the app does not have the permission.

This will help in the following ways :-

  • Reduce code.
  • Reduce blocks at Screen1.Initialize [Quite important.]
  • Will be useful incase the user has removed the permission.

I knew I was going to mess that up. The only way I get any files listed in Music Titles 4 is to have get global APK = true set when using companion. It does play the file but get a notice that it can't find the cue sheet.

Hi Anke

All media is put on the device by the User, and the amount will grow overtime. Most times, the media is going to be directly transferred from a PC, via a card or USB.

The App plays the music and displays the cue sheet, it does not supply any media.

The interpretation of what media actually is certainly seems to depend on Industry. One of daughters is in the film industry and as far as they are concerned, HTML and PDF are media. Google seem to have a different point of view :roll_eyes:

1 Like

There has to be a way to move onto the next part of the process. The best way is to use a Procedure to start the next stage, which I have not done, but this is a test snippet where the primary concern is to get the media loaded and running.

Hi Richard

I'm wondering if we would be more successful if the files were in the Android Documents folder.

That should not happen. I will edit the snippet.

Hi Richard - MusicTitles5

  1. Please create a folder called 'PlayMusic' in the Android Documents Folder, and put some mp3's with their related HTMLs in that new folder.

Code changes:

  1. Added a QA Label which indicates if the App should be running via the Companion or as an APK (depending on your manual setting of the APK Variable).
  2. Code loads files from /Documents/MyMusic
  3. A local Html page (in-App) will be displayed if a Cue file is not found
  4. Streamlined the file listing process.

Works perfectly here!

MusicTitles5.aia (43.1 KB)

In companion

  • set to true = finds and plays music doesn't find cue
  • set to false = finds no files
    In APK
  • set to true = finds no files
  • set to false = finds and plays music doesn't find cue

Files mp3 and html are in folder Documents/PlayMusic