I can tell you how I do it. I don't have a neat sample code handy, but
I can give you an example below.
So 'GLWallpaperService' creates an 'Engine', which in turn creates the
'Renderer'. It's in your Renderer that you need
to access image or other resources. So I pass an instance of resources
to the constructor of the Renderer.
MyWallpaperService.java:
public class MyWallpaperService extends GLWallpaperService
{
.....
MyEngine engine = new MyEngine();
.....
class MyEngine extends GLEngine
{
MyRenderer myRend = new MyRenderer( getResources());
// Pass the instance of resources to the Renderer
}
}
MyRenderer.java:
public class MyRenderer implements GLWallpaperService.Renderer
{
public MyRenderer(Resources appR)
{
// now you can use appR to access your resources. ex To access an
image called 'myjpgimage' in the res/raw use appR.raw.myjpgimage
}
}
Hope that helps.
Mukul.