Hi Vishal,
That code block for SharedPreferences example.
It always run for every app. Tried that many times everthing is ok.
However it does not working in my existing app.
I checked many different way but it didn't.
I looking for what is wrong with my app?
22 Aralık 2015 Salı 09:20:09 UTC+2 tarihinde VISHAL TIKKU yazdı:
>
> Hi
> Is it throwing any exception firstly please trace that and can you please
> elaborate a little about your problem.
>
> On Monday, December 21, 2015 at 4:08:28 PM UTC+5:30, Cihan KALOĞLU wrote:
>>
>> 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 [email protected].
To post to this group, send email to [email protected].
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/c13ce66b-4639-4922-85c0-a4fd361cf9d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.