Using Preferences(Beginning Android)
To get access to the preferences, you have three APIs to choose from:
• getPreferences() from within your Activity, to access activity-specific preferences
• getSharedPreferences() from within your Activity (or other application Context), to access application-level preferences
• getDefaultSharedPreferences(), on PreferencesManager, to get the shared preferences that work in concert with Android’s overall preference framework