You have spaces in the filename... for the player component replace them by %20, see also the jukebox example here
Taifun
You have spaces in the filename... for the player component replace them by %20, see also the jukebox example here
Taifun
I downloaded your juke box, and will sort through and figure out some stuff about spaces, thanks.
After doing the %20 replacement, I still get the same error
Did you test with Companion or the APK?
If the latter, did you request READ_MEDIA_AUDIO
permission (on Android 13+)?
This essentially word for word from Taifun, save the addition of the error message.
I have set, reset, unset permissions, but seems t make no difference, but will go back and re-investigate permissions.
Companion, APK, Chromebook... all running Android 11. This error shows on chromebook companion. I will compile it and run on a phone, see if it makes a difference yet...
Show the (relevant) blocks.
And see also here:
Hmm, there shouldn't be any problems there.
No, there should not, but there is. I have read all that I can find, followed numerous instructions and still cannot get it to work.
I may just go and buy a flippin' mp3 player!!
What happens if you use that example as it is?
Taifun
A couple of things,
(after cpturing error as a readable message and changing from 'Music" to "musica")
Make sure there is at least one audio file in the /Music
folder.
I swapped these to reflect where my music is stored
For large music archives the method FileList gets unresponsive.... use the asynchronous method FileListAsync instead
From the documentation
FileList
Return a list of filenames of a given directory.
Use this method for specific directories to get back a result immediately. To get a list for a complete device or sdcard, which may take a few seconds, use the FileListAsync method instead.
Taifun
Also make sure there are music files available on your internal (emulated) sdcard... it looks like no file was found?
Try @Anke 's modified version, which asks for permissions... the example is already a few years old...
Taifun
This has all been great, and I really do appreciate all the input from all of you;Sunny, Taifun, Tim, Anke. I will play around with what I have now, and bend it all to suit my requirements. I hope this may put an end to the questions, but as the whole android file structure seems to me an incredibly over complicated control device, I will most likely be back.
Charley
In addendum: why does g[lobal listMusic] not show in the list view? And how would one make it show in a list view?
Is your question probably "why is the list empty"?
are there mp3 or m4a files in your directory /storage/emulated/0/Music
available?
the blocks look fine like this...
did you
use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
I did right click n Do it. I get [] as a result. Th juke box still plays music though
if music is playing, then there are music files and then the list can't be empty... I currently do not know, why you get an empty list
To refresh your listview try the Refresh method
https://ai2.appinventor.mit.edu/reference/components/userinterface.html#ListView
Refresh()
Reload the ListView to reflect any changes in the data.
Taifun