

When you want to get the values, call the getSharedPreferences() method. So name it with the package name of your app- unique and easy to associate with the app. The first thing we need to do is to create one shared preferences file per app.
HOW TO USE PREFEDIT HOW TO
A common use is to store user preferences A common use is to recreate the state after the device has been rotated How to Create Shared Preferences? Data that should not be remembered across sessions, such as the currently selected tab or current state of activity. Data that should be remembered across sessions, such as user’s preferred settings or their game score.

Saved Instance State Persist Data across user sessions, even if the app is killed and restarted, or the device is rebooted Preserves state data across activity instances in the same user session.
HOW TO USE PREFEDIT ANDROID
Shared Preferences in Android with Example.How to Make an Activity Appear Only Once in Android?.Locale getDisplayName(Locale) Method in Java with Examples.

