This is generally what I have:
class A extends Activity{
// On a click, starts service B.
}
class B extends IntentService{
C c = new C();
c.init();
}
class C {
public void init(){
// Read a file from the /raw directory.
}
}
Doing Internet searching, I found swaths of resources that said to use getAssets. However, I'm unable to do that since C does not extend an Activity, and, thus, can't see A's context. I thought of passing it down, but I'm not able to do that since A does a startService on a Class object and not on B itself. Is there a way to do this simply (preferably getting the darn URL for the raw/ folder) or do I have to do some Java magic to get this to work? Thanks in advance.