Get values in Properties file with Android Library from Android Application
<p>From this <a href="http://stackoverflow.com/questions/10267594/how-to-access-assets-folder-in-my-android-app">question</a>, I know how to obtain Properties within an Android Application.</p>

<p>However, if I want to write an Android Library, and intend to read a properties file (say <code>myconfig.properties</code>, how can I do so?</p>

<p>Given that the Android Library (e.g. it's called "myAndroidLib" ) has <code>android-support-v4.jar</code> , and this library is imported to an Android Application. Also given that <code>myconfig.properties</code> exists.</p>

<p>I found a piece of code in the Internet, but this works only within Android:</p>

<pre><code>Resources resources = this.getResources();
AssetManager assetManager = resources.getAssets();

// Read from the /assets directory
try {
    InputStream inputStream = assetManager.open("microlog.properties");
    Properties properties = new Properties();
    properties.load(inputStream);
    System.out.println("The properties are now loaded");
    System.out.println("properties: " + properties);
} catch (IOException e) {
    System.err.println("Failed to open microlog property file");
    e.printStackTrace();
}
</code></pre>
