I'm working on an Android project with multipl开发者_StackOverflow社区e layers such as core,business,gui etc.
I wanna read an Application.properties file in core layer for example but when I use standart java file reading methods I access phone directories.
How can I load such a properties file that resides under com.xxx.properties package in my core layer?
Thank you.
You can for example have access to a file you previsously placed in the assets folder.
InputStream myInput = myContext.getAssets().open(name_of_file);
and you can use:
myInput.read();
精彩评论