Individual resources are stored using key/value pairs. They keys used in resource files are defined in java interfaces that can be referenced from your source code allowing you to access the data. There is a mechanism that allows these java interface files to be automatically generated so any key you use in a resource file is automatically available for use in your java source code.
drc -i myresources.rsrc -o myresources.rdb
The resource file is a simple text file that contains individual resource definitions. A resource definition consists of three components: a type, a unique identifier, and the data. For example:
string kStringID "This is a string."
The data can either be the actual data as in the definition above, or a reference to a file containing the data:
sound kSoundID "sounds/sound.wav"
Any line that begins with the '#' character is considered a comment and is ignored by the compiler.
# This is a comment.
There are two required resource definitions for each application. They are the application name and application class. Some examples:
string ID_AppName "Hello World" string ID_AppClass "com.examples.helloworld"