If you know the path to the directory the mp3s are stored in, you could
and
and
to load the titles to a ListPicker.
This might not work when nb187 is released. The code loads the mp3s from my external sdCard.
If you know the path to the directory the mp3s are stored in, you could
and
and
to load the titles to a ListPicker.
This might not work when nb187 is released. The code loads the mp3s from my external sdCard.
This APK was built on the test server (targetSdk = 30
).
Try it especially on Android 11 devices with a removable (micro) SD card.
Note:
This request is addressed to everyone who has an Android 11 device with an external (removable) SD card. Please test it and tell us if it works there too.
(It works (tested) on Android 11 devices without a removable SD card.)
Unfortunately, I have neither an Android 10 nor Android 11 test device with an external (removable) SD card.
It seems to work even on Android 11:
working on a Samsung A51 running Android 11
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
Thanks, good to know that it also works on Android 11 devices from different manufacturers.
Btw, I don't think it's possible to do this with the (new) File
component (test server).
I used your TaifunFile
extension.
I did this method and it does read the files on the sd card automaticly but, when the app starts it returns this error:
The operation add items to list cannot accept the arguments: , [""], ["/storage/2295-1DEA/Music/Minecraft.mp3"]
These are my blocks:
And also, why is the replacement needed and the two empty text blocks?
the error message happens in an add items to list block...
you do not show your relevant blocks...
it looks like your list is not a list...
Taifun
What do you mean by that?
I thought this were my relevant blocks since the error happens when screen initialize
the error message tells you, that it occurs while using an add items to list block
also this [""]
from the error message looks like you are using an empty text block rather than a create empty list block for the list
Taifun
What is about the .AfterFileListAsync
event / block?
ok, so how did you initialize the global variable songList?
protip: my previous answer could help you to fix your bug...
Taifun
If the mp3 title has a space, replace the space with a control character. An mp3 like Swingin Safari.mp3 would not play with a space.
Two empty text Blocks...just me experimenting, they are not needed.
I did not want the ListPicker to display the path. Artistic license.
Ohh ok.
Yeah, me too, I don´t want it to show the path. But how do I do that?
Yes it did work, I was adding an empty text block instead of a create empty list
Already provided the code. See when TaifunjFile1.AfterFileListAsync Event Handler.
Create global musicFiles and create global songList Lists. The add items to list Block creates a new List without the path and strips the path information. What you place in segment depends on your path (not mine). Set that list to the ListPicker.Elements and see what happens.
Yeah, i just realized that it was a different path and that´s why it was showing the path
Did you try my test APK?
If so, does it work for you?
It does work for me. But what did you put for the player1.source?
Because this is not working:
I don´t know why in some audios it does play but in other ones it returns an error even though they are the same path...