Keeping external application configuration centralized in Android
<p>(Android-Noob)</p>

<p>I can't find a best approach for encapsulating configuration resources.</p>

<p>Basically I'd like to keep configuration values like these:</p>

<pre class="lang-xml prettyprint-override"><code>&lt;string name="environment"&gt;dev&lt;/string&gt; 
&lt;integer name="lookup_timeout"&gt;750&lt;/integer&gt; 
&lt;boolean name="use_cache"&gt;true&lt;/boolean&gt;
</code></pre>

<ul>
<li>all in one place,  </li>
<li>in a single xml-file </li>
<li>accessible from Java through some kind of unified method (<code>R.config.environment</code>)</li>
</ul>

<p>Anything I'm missing?</p>

<p><strong>Update</strong>: What are configuration resources? </p>

<p>A set of values that typically is environment specific and will most probably change / being fine-tuned by the developer during application development. It is certainly not user-modifiable, and though has nothing to do with user-preferences.</p>

<p>Typical examples are:</p>

<ul>
<li>the general log level</li>
<li>the place where logs are written to</li>
<li>the urls of servers (development / integration / production)</li>
</ul>

<p>C'mon, you must know what I mean ;-)</p>
