Source for Player

I have tryed this but I have an error
blocks(1)

(Card was card, sorry)

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

1 Like

grafik

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):

grafik

see also here:
https://groups.google.com/forum/#!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

blocks(2)
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

Taifun


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:

2 Likes

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:

grafik

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).
Thanks.

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