1

In my application I have to keep some setting options for a user, like currency type, language, Calendar view (Either Calendar or List) etc.

Here I am confused whether I have to configure all this by creating database tables or should keep this in any xlm or text file. Please guide if there any more convenient way? thanks.

Book Of Zeus
  • 49,509
  • 18
  • 174
  • 171
Neetesh
  • 116
  • 2
  • 3
  • 7

3 Answers3

4

you can use android shared preferences to store a users preferences. Alternatively you can store "global" variables if you create a Application instance which has static or instance variables to access (but these values can be lost if your Activity is destroyed)

The answer on this thread has details on global application to store application wide variables

Hope that helps

Community
  • 1
  • 1
wired00
  • 13,930
  • 7
  • 70
  • 73
0

Android has Shared Preference specifically for this purpose. http://developer.android.com/reference/android/content/SharedPreferences.html

Jana
  • 2,890
  • 5
  • 35
  • 45
0

The solution would be to use shared preference

You can also look into PreferenceActivity which helps in building a setting page.

Josnidhin
  • 12,469
  • 9
  • 42
  • 61