You can save and retrieve key, value pair data from Shared preferences.SharedPreferences values will persist across user sessions. Data in shared preferences will be persistent even though user closes the application.You can get values from Shared preferences using getSharedPreferences() method.You also need an editor to edit and save the changes in shared preferences.Use SharedPreferences to store data: booleans, floats, ints, longs, and strings.

MODE_APPEND - This will append the new preferences with the already existing preferences

MODE_ENABLE_WRITE_AHEAD_LOGGING - Database open flag. When it is set , it would enable write ahead logging by default

MODE_MULTI_PROCESS - This method will check for modification of preferences even if the sharedpreference instance has already been loaded

MODE_PRIVATE - By setting this mode , the file can only be accessed using calling application

MODE_WORLD_READABLE - This mode allow other application to read the preferences

MODE_WORLD_WRITEABLE - This mode allow other application to write the preferences