In my res/raw folder, I have many .wav files. I want my program to choose a random sound clip from my res/raw folder and play it when I click a button.
I know a way to do it by hard coding the .wav IDs, auto-generated in the R class. But I just have too many .wav files to manually type each ID
I spent hours researching about this but I have no idea. Any help will be appreciated. Thanks!
EDIT: The .wav files do not have to be in the res/raw folder. I can move it inside assets folder if it makes things easier...
I know a way to do it by hard coding the .wav IDs, auto-generated in the R class. But I just have too many .wav files to manually type each ID
I spent hours researching about this but I have no idea. Any help will be appreciated. Thanks!
EDIT: The .wav files do not have to be in the res/raw folder. I can move it inside assets folder if it makes things easier...