Listpicker filter bar

That's what we are trying to find out :grin:

I think it's time to end this. I just tried it, Music Titles5, works on a different Android 10 tablet, cheap Chinese one. and it works. It doesn't work on a Samsung Tab A, with Android 10.

Anke,
This is for a very small group of people with a much smaller collection of music than you have and many of the html files have already been created. It will never be offered on Google play.

Chris,
Thank you, the html file is one of the few I did when I was playing around with how to easily create them. Most of the others I have are html 4. I honestly didn't have any idea that devices were being produced that don't have external storage. I don't like to take up space on internal memory with a lot of things that take up space. Anything that relies on cloud would be pretty useless in my world, Again thank you

I had no intention of this going like this with my original question. It has turned into much more than I, with my limited experience, could implement into my own project.

This app should work on all Android versions.

  • It lists all MP3s from external storage (regardless of where they are).
  • It lists also all MP3s from a microSD card (if available).
  • You can sort und unsort MP3s.
  • You can search for keywords. The MP3s found are then listed and can be selected and played.

If the corresponding HTML files are available in the respective folders, they are displayed using a WebViewer. The HTML file names must have the same names as the MP3 files except for the extension. There is no need to remove any spaces or replace them with %20.

https://drive.google.com/file/d/1VOzDX2cDpctjtawsXSvUFKk2qbJ3OGOh/view?usp=sharing

On devices with Android 11+ MANAGE_EXTERNAL_STORAGE must be granted. The app automatically requests this permission on Android 11+.

The files are small, they really don't take much memory at all - the average Tablet has 32GB of storage available.

I'm glad to hear you have seen 5 working :sunglasses: I should have asked you about your specific hardware because you are not the only one to have an issue with a Samsung TabA.

If the HTML files are a problem to produce, we could either make a Desktop program, or maybe you could use text files displayed in a Label Component.

I would like to know if my app (APK) will work on your test devices as well, because it should.

I tested it on 4 of my test devices (Android 9 {Samsung Galaxy Note8, Xiaomi Redmi Note5}, 11, 12). Both Android 9 devices have a microSDcard.
Works fine on all.

Yes it works on two Android 10 tablets, an Android 9 tablet, an Android 10 phone and an Android 7.7.2 phone. That's all I have to test on.
The Galaxy TabA tablet seems to give the most problems. The other tablet is a cheap Chinese thing I bought to test things on.
All have internal sd card. I loaded things into both internal and external storage and it found everything including all mp3 files the phone came with, ringtones, whistles and other annoying sounds.

Ok fine, do you have a device where it's not working?
If so, which and which Android version.

I have 20 test devices running Android 2.x, 4.x, 5.x, 7, 8.x, 9, 10, 11, 12.
So I can check it.

As I said, it should work on all Android versions / devices.

Thank you. It works on everything I have.

1 Like

My app lists all MP3s from the device.
If only special folders should be listed, this is no problem at all.

The app is for demonstration purposes only to show what is possible.

Understood, ideally it would only look in one, maybe two specific folders on external storage. For neatness one folder for music and another for the html files. If not, everything could go in one folder.

Are there any problems with any of the methods:

  • sorting / unsorting
  • searching
  • selecting
  • playing
  • getting HTML files if available.

On one device only, the Galaxy tabA android 10. When I first open the app there are no files shown. If I hit the sort button twice they show up. After that the sort/unsort button works. The search function does not work. All of the other devices show the list and sort function does work.

On the old phone, Android 7.1.2 picking many of the songs gets a runtime error.

Attempt to invoke virtual method 'void android.media.MediaPlayer.setAudioStreamType(int)' on a null object reference.

I'm not too worried about that one.

Everything else works fine. Just curious, why have the unsort? Once it's sorted a-z anything other than maybe z-a seems unnecessary.

No, the extension does not use SAF
Taifun

I tested it now on another two devices. No issues. It should work on your tabA as well.
Uninstall it and reinstall. Does it ask for permission on the first run?

What happened ...?
I won't believe that until I see it myself. So post screenshots or (even better) make a video of it.
It works on all of my test devices.

My app plays MP3s immediately after picking. Apparently, your slow Android 7 device needs a little more time to read (get) the path.

I will test it later on one of my Android 7 devices (which have to be charged first).

The solution for this would be to not play the MP3s after picking, but only when clicking on the Play button (►) as you initially intended.

Tested on a very old Samsung Galaxy S6 (Android 7.0):
No issues, all methods work perfectly and MP3s are played without any problems after picking.

It also works on a very very old Samsung Galaxy Note3 (Android 5.0). But MP3s are not listed on Android < 6 at Screen.Initialize, because permissions are granted there at install-time. So the Permission.Granted event is not triggered on Android 5 and below. Fixed now.

I also removed playing after picking. So it should now work also on your very slow Android 7 device.

EDIT: APK removed.

Same problem with the Galaxy here's a recording of the latest. I note that after the first permission is granted it askes for permission again before it will load the files. I have not seen that on other apps that have asked for permission.

My after thought was it's better if they are all in one folder - easy to spot if filenames are not identical when they should be.

Yes, my fault (two blocks were in the wrong position in the Screen.Initialize event).
That's why the play & stop buttons are not shown correctly and the search feature didn't work after restarting the app.

Blocks - Screen.Initialize

By the way, you were also wrong in claiming that your Galaxy tab has Android 10. :wink:
It has Android 11 or 12, otherwise the MANAGE_EXTERNAL_STORAGE permission would NOT have been requested.

Try this one (I removed my other APKs from Google Drive):

It should also work without uninstalling the previous version. But maybe you try to uninstall it first und reinstall. I changed the app name to the package name (project name).

1 Like