Problem with SharedPreferences
- by user547995
Code for restore:
final SharedPreferences settings = getSharedPreferences("pref", 0);
settings.getString("user", "");
settings.getString("pw", "");
Code for store:
SharedPreferences.Editor editor = settings.edit();
editor.putString("user", etuser.getText().toString());
editor.putString("pw", etpw.getText().toString());
editor.commit();
This code don't work, and no error occur