IdleSun's Weblog

November 11, 2010

Android SharedPreferences.edit().commit() lies! Not really.

Filed under: Android,Java — idlesun @ 5:37 am

 

This post has been moved to my new blog.

 

Advertisements

5 Comments »

  1. This post did, as you expected, save my time! Thanks a million!

    Comment by Fullbandwidth — February 17, 2011 @ 7:50 pm | Reply

  2. you are a gentleman and a scholar.

    Comment by chewychompy — July 24, 2011 @ 9:24 pm | Reply

    • Thanks.

      Comment by idlesun — July 24, 2011 @ 10:08 pm | Reply

  3. SharedPreferences perfs = getSharedPreferences();
    prefs.edit().putString(“greeting”, “Hello there!”);
    prefs.edit().commit(); // ture, but nothing happens

    This should or can be:

    SharedPreferences perfs = getSharedPreferences();
    prefs.edit().putString(“greeting”, “Hello there!”).commit();

    and it is works.

    Comment by daro2189 — December 22, 2011 @ 7:21 am | Reply

  4. thx!

    Comment by Marty — August 23, 2012 @ 6:43 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: