Added storing value in shared preferences.