My app can´t read files from portable sd card

Hello.

I´m making an mp3 player app but my app can`t read files from sd card.

I´ve tried this:


(the list view selection says audio.mp3)
and this:
Captura de pantalla 2021-07-24 a la(s) 17.14.38
but still i cant play the audio, it says Error 701

image
returns a list, your blocks for this will not work, use a select item from list block with it.

Try your path without the file://

Is this what you´re talking about?


I´m pretty sure that I´m wrong so, can you send a snip of the blocks?

That doesn't look too bad... probably it is the 2nd item from the list?
What about using Do it to debug yourself?

use Do it to debug your blocks, see also tip 4 here https://puravidaapps.com/learn.php
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

If is like this, it is not working, it still gives me error 701.

use Do it to debug your blocks, see also tip 4 here https://puravidaapps.com/learn.php
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

I pressed the Do it option and it did the exact same thing.
The differnce was that I wasn´t pressing my phone`s screen.

Show us your Do it result
Taifun

how do I do that? when I press do it I don´t see any result.. (only what I described at the top)

Try the this on your device (it may take a few seconds for the files to be listed, depending on the number of MP3 files on the (removable) SD card):

Blocks

See here (→ point 4):

Here it is:

As I've shown, try: jion
file://

It did play the audio!!!

But when its inside folders it cannot.

I think its because it´s a different path...

also, do you think that this is the best way to identify if its an audio from sdcard or not?

Because with this method I can play from sdcard and internal storage.


List uri contains /sdcard/audio.mp3

I'll answer this later, when I'm back at my PC.
Does my test APK work for you?

Yes it does, that´s why i´m confused that my app cant´t read files inside folders.

I updated my method and now I can play files inside folders from sd card or internal!!!!

So, if you want to try try this method :wink:

1 Like

Thanks but, I alredy developed the progress bar :confused: (with help from @Patryk_F ) ..

But still, its gonna e helpfull for future projects!

If you want I can send you the .aia file so that you can test it.