Configuration file in Android. Does that exist?

JSBach picture JSBach · Jun 10, 2011 · Viewed 32.3k times · Source

I have some configuration I want to save it in my Android application and read it whenever I need , for instance, the server URL that it should try to access like that.

Is there any similar mechanism like web.config in ASP.NET available in Android?

A central configuration file that can be set up manually and then read by the application? Any help would be appreciated!

Answer

omermuhammed picture omermuhammed · Jun 10, 2011

We use a .properties file in assets folder. It works out very well for us as we support multiple carriers with this, write to it (in case some values, sent from server, need to change. This is done at app start time, thus making our code configurable from server).