• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps how to store application configuration asks a Newbia

horatio

Newbie
Hi All,

New to Android! Can anyone tell me the best way to store application configuration? I want to store items such as URLs and so on. I'm thinking of using Apache Commons configuration but that would mean bundling those jars with my application. Is there a native Android way to do this?

Thanks,
John.
 
Thanks KlaymenDK. That's not quite what I'm looking for however. I want to store application configuration that is never presented to the user. My application will need to make periodic calls to a RESTful web service and I need to store the URL some place that my app can read on initialisation. This shouldn't be presented to the user to change. Is there something like the Windows registry or INI files available for example?

Cheers,
John.
 
Okay, I misunderstood you, then.

There is no global registry; the prefs system is explicitly intended to store app-specific tidbits; you can use it for storing stuff (say, internal state information) without ever interfacing the user. Or, you could look into the "instance states" discussed here (although data stored this way won't survive a reboot).

I had better info but I can't find the links right now! :o
 
Back
Top Bottom