I have a string that identifies a resource that i want to grab.
I know about the following:
public int getIdentifier(String name, String defType, String defPackage)
However i need to use it in an external class, and it won’t let me.
For example i have a string called “thefile” and i want to access R.raw.thefile
Any ideas? I’m stuck
Cheers
You could pass a Context to your external class. Example…
Then in your Activity…