Source for Player

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

I think I have already tried it but it didn’t work. But I’ll try again.
Thank you.

It’s working only for the internal SDcard (i.e. the internal memory /storage/emulated/0/file.m4a).

Try this:
(put file.m4a in the root dir of the Internal Storage & in the root dir of the removalbe SDcard):
playerSource2.aia (35.9 KB)

see: Player.IsPlaying = true !

1 Like

Hope I’m not jumping in at the wrong place here but having read down the exchanges I have a related problem with Player. In my case the sources are URLs for internet radio stations. This works fine in most cases, but if there is no response to Player.start then the entire app hangs up - every button dead and eventually an apology from AI Companion with options to wait, report or quit. How can I trap this type of error / time out? It is not seen by the ScreenError block which is where I’d normally handle runtime errors. Any suggestions / work-arounds?

1 Like