Pick and play audio from sd card

Hello,

I hate to do this since i am sure there are topics that answer this and I have spent 2 days implementing numerous methods, but I must be very confused so I need some help.

How do I pick an audio file from an sd card and play that audio using exoPlayer?

I have tried using the Taifun File extension and use the path directory from it but I am getting no luck.
I have tried to add file:// before the selection from audiopicker but this has not worked for me.

Again apologies if this has been answered but I have been trying for quite a while now.

Try with /storage/emulated/0/YOUR FILE PARTH

You can use file tools extension Todo that

First of all use get all available directory it will return you 2 directory
1)Internal storage path
2) external SD card path

Then you can use the path to get what you want

Thanks for the reply.
This unfortunately does not work.

Thank you very much for the reply.
Once I have the directory for the sd card path what do i do.
I have tried this with Taifuns file extension but it did not work. Also when i pick an audio file the selection already uses the same path that the directory uses

When you get the path use it to get MP3 files normally as of now you’re trying to get from internal storage both process is similar main thing is getting the SD card path

/storage/3130-6239/Music/Downloads SD/the-game-youtubemp3free.org.mp3

this is the file path for the audio picked. When i use the available directory tool it gives the same path

Using the file exists block it shows as true but it does not play any audio for some reason

Try with taifun player.
Don’t know why but I also faced some problem using exo player to I used taifun player and it works

1 Like

Hey Asit, This ended up working for me! Thank you so much the audio plays now using Taifuns extension. Gonna take me a few days to redo all the blocks but hopefully works fine now.

1 Like

Good luck keep Koding

1 Like

Yes, the ExoPlayer component does not work with audio files from the removeable (micro) SD card.
This is a bug. → @Kodular

ExoPlayer.isPlaying = true, but there is no sound.
The Payer component and the TaifunPlayer extension work fine.

3 Likes

Yes! I had the player on but nothing was playing. Thought I was going crazy. Thanks for letting me know.