I\'m developing an application in which I\'m storing username and password in SharedPreferences. All things are working fine for me, s
See I have done like below.
sharedPreferences = PreferenceManager
.getDefaultSharedPreferences(getApplicationContext());
editor = sharedPreferences.edit();
isPaidVerison = sharedPreferences.getInt("isPaidVerison", 0);
editor.putInt("isPaidVerison", 1);
editor.commit();
And this works fine. Data will remain in Sharedprefrences till will do not reinstall the app or till will d'not clear data.
And I retrive data this way.
isPaidVerison = sharedPreferences.getInt("isPaidVerison", 0);