I want to get the resource id of the file located in /res/raw folder by filename. I have tried the following 2 methods but both of them return resource id as
/res/raw
Drop the extension:
String filename = "abc"; int id = getResources().getIdentifier(filename, "raw", getPackageName());