I need to parametrize my app by adding, for example, the URL of a web service to be called. In other environments I would use a .ini file or a web.config file to store the info. How can this be achieved in Android?
I need to parametrize my app by adding, for example, the URL of a
Share
For android you can store settings in a number of ways. The simplest is SharedPreferences. You could also store the values in a sqlite database or use a ContentProvider.
To retrieve preferences, you do something like below.
You can then set these from a PreferenceActivity with some defaults provided in the XML that stores your preferences.