Source for Player

Palese give me a correct example for the set player source if I want to play an audio file from my SD card. Thank you.

If you call the player directly after setting the source and you get an error, you may need to include a clock timer, just to give the source time to set before calling the player.

I have tryed this but I have an error

(Card was card, sorry)

Your SDCard path is probably wrong, see Anke’s post above

1 Like


My audio files are all on the SD card.

Are you talking about an external (removable) SD card?

If the device has an removable SDcard you get something like this, otherwise you get only the second item):


see also here:!searchin/mitappinventortest/is$20the$20root$20directory|sort:date/mitappinventortest/lRv4pzvr7fk/QKW4vkcmCAAJ

1 Like

No need for that, try somethink like this:

I put my audio file from SD card to internal memory …/Audio/
Now this

is working fine.
Now I’d like it to work directly from my SD card (external removable) (the /sdcard/file.m4a is not working).
Thank you and again my apologizes.

I don't know, if the player component is able to access the external sdcard...
If you want to test it, then you have to use the correct path to the external sdcard...
you can find it out using the file extension and its AvailableStorageDirectories method as @Anke already mentioned here


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

Yes, the Player component can access the removable SD card, as I have already shown:


If your question has been answered, please close this thread by clicking on "Solution".

I have solved by using ActivityStarter with GET_CONTENT and audio/*. I was’nt able to use your hints.
However, many thanks again.

So please let the community know your solution. Maybe this will help others.

Why? What doesn't work for you?

This thread continues here:

... but why?

My solution:
ActivityStarter --> Action: android.intent.action.GET_CONTENT --> DataType: audio/*

Because your SD card's ID might not be same with @Anke's, every removable SD card has own ID, and own folder to access. "9C33-6BBD" is SD card's ID. Did you replaced this part of path with your own SD card's ID?

Yes, I think I showed above how to get the ID of the removable SD card:


1 Like