Hi,

I tried all ways how many i know.

That is my code block for test. (MainActivity.onCreate())

String REMEMBERME_PREF_NAME = "rememberme";
SharedPreferences sharedpreferences = 
this.getSharedPreferences(REMEMBERME_PREF_NAME, Context.MODE_PRIVATE);
if (sharedpreferences.getString("email", "").equals("")) {
    Log.d("SHARED PREF", "onCreate() returned: " + "CAN'T REMEMBER");
    SharedPreferences.Editor editor = sharedpreferences.edit();
    editor.clear();
    editor.putString("email", "REMEMBERED");
    editor.commit();
}
Log.d("SHARED PREF", "onCreate() returned: " + 
sharedpreferences.getString("email", ":("));




This code working for all new apps or other existing apps but it still 
doesn't work for my app.

What is wrong with my app?

Could anybody help me?

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/387886b3-9c74-4bd9-a24c-d10fac89a218%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to