My Android project is intended to be distributional as a reusable library, as a jar. My understanding is that I can not use any resources (no references to the static R class). I have a couple of questions about how to do this.
What is a good way to handle drawables? If I include an image on my sourcepath at /images/image.png then I can load it with the below code. Is this a good strategy?
InputStream is = getClass().getResourceAsStream("/images/image.png");
BitmapFactory.decodeStream(is);
How should I handle internationalization? I guess I could include all my strings into a Java class and than return one based on the device’s language. But, would this be a memory burden on my app? Also, what is the proper way to determine the device’s language?
Is there any reason for distributing it as a jar? I would advice you to distribute it as a Library Project instead. Android Library Projects, described here, will let you use the static R class the same way you use it in a normal project, and you will have the ability to handle internationalization as well.
A very good reason for using a library project is the fact that resources placed in the res/ folder are heavily compressed compile-time to decrease the final size of you binary. This is true both for images and xml files.