Reputation: 11
I have a few mp3 files in raw folder in which some of the file name have two words.I mean space between the words.Please help me how to read the file name.
Upvotes: 0
Views: 335
Reputation: 104
That's not a valid resource naming. Replace all spaces with underline character (_
):
Original - original file name.mp3
Changed - original_file_name.mp3
This will allow you to access that file through Resources.openRawResource() API.
Upvotes: 2