• 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
Feb 28, 2010
17
0
Dublin
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.
 
Upvote 0
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! :eek:
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones