App does not run sdcard files

What does that mean "only through manual selection?

It means that I need to go to the folder where the mp3 is and select what I want. I need to tell your app which folder and which way it can play the song.

What I intend to do is make this process automatic, without user intervention. If you can give me the .aia of this apk and if it is not wrong I ask for it I would be very grateful.

Show your blocks where you set the path for the Player.
I’ll show you how to correct it.

Ok.

Connect your device to Companion and make a right mouse click → Do it on this block:

and post the result.

Here it is, as you asked.

But I just realized something. When building the list, the extension is changing the name of the store. For example … my device’s external storage is this … “/ storage / 50F0-1611 /”. The internal storage would be this … “/ storage / emulated / 0”. And the variable “global Musica”, is setting the path for all items as “/storage/emulated/0/myfile.mp3”. so I think the error is here. It helps me to understand if this extension is configured correctly.

The result for the

  1. external (removable) SD card should look like this:

grafik

  1. for the root directory of the external storage:

/storage/emulated/0/music-1.mp3

Here are the blocks to get the correct paths:

I think the problem is with the extension that is sending the wrong list value. Could you check my fileAfterSync blocks please

No, check my blocks. They will work.

I got inspired by your blocks and put these together. Now error message 2101 (file not found) does not appear, but the file does not execute. What could I have done wrong? I am sending the blocs and the results of COmpanion


What does this mean? Is the mp3 not played?
Your blocks should work.
Post a test aia. I can take a look.

Btw, what is that (you should get the same result / path):

Exactly. The mp3 is not playing. Posting test.aia
test.aia (42.8 KB)

you have to replace the spaces in the filename by %20 to get a valid path for the player component, see also the jukebox example here App Inventor Extensions: File | Pura Vida Apps

Taifun

1 Like

You should have mentioned that you are using ExoPlayer.
The ExoPlayer doesn’t play from a removable SD card.

I reported this issue / bug alread in Sept: → @Kodular

So use the Player component or the TaifunPlayer ext.

1 Like

I don’t believe I made that mistake. It was a total lack of attention from me. I had already seen your comment reporting this and I really thought I was using the native Player.
I’m sorry to you and everyone for the failure. I will change immediately and post the result.

Nobody (at least from the Kodular team) seems to notice my bug reports :upside_down_face:
(and there were a lot). :sob:

2 Likes

probably it would be a good idea to start a thread with a list of all the bugs you (and others) found including a link to the corresponding thread to find the details there

Taifun

Hi guys. I got it.
Thanks to the help and explanations from you who helped me and guided me on the right path. I would like to thank everyone who interacted in this post with ideas that are always welcome.
I am especially grateful to @Taifun who provided this fantastic extension and gave me a hint as to the spaces in the file names. And also to @bodymindpower who reasoned with me and pointed out the Exoplayer error that I had not noticed.
Just to summarize what I did: I created a variable that receives how many volumes there are on the device. Then I created another variable that receives data from the Taifun extension, and instead of the “dir” parameter I select from the list of the variable I created, the index and add the text “file: //”. When AfterFIleAsync runs I only add the rest of the files, if any, to the list. The part of the player that gave me so much headache, I’ll show you below.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.