Thursday, February 17, 2011

[android-developers] Re: Problem reading shared preferences in Gingerbread

I am able to read the same in Froyo. Only on android version 2.3 and
above not able to read.

On Feb 17, 4:23 pm, "A N K ! T" <ankit.awasth...@gmail.com> wrote:
> is there any key in that preferences named "tag_name"...may be this is
> causing a problem...
>
>
>
> On Thu, Feb 17, 2011 at 11:11 AM, Reddy <devireddy....@gmail.com> wrote:
> > I am reading the static file (default.xml) which will be present in
> > system/etc/<...>/<package_name> folder.
> > Not writing any values into the file
>
> > On Feb 16, 4:23 pm, Kostya Vasilyev <kmans...@gmail.com> wrote:
> > > What's your code to store values?
>
> > > 16.02.2011 14:16, Reddy пишет:
>
> > > > Hello everyone,
>
> > > > I am facing a problem when i am reading the shared preferences
> > > > (defaults.xml) in Gingerbread. Following is the code snippet, what i
> > > > am using.
>
> > > > SharedPreferences prefs =
> > > > PreferenceManager.getDefaultSharedPreferences(this);
>
> > > > mystring = prefs.getString("tag_name",default_value);
>
> > > > When this is executed, always i am getting the default value.
>
> > > > The same piece of code is working in Froyo.
>
> > > > Has any one is having any idea, what is the difference between
> > > > Gingerbread and Froyo in this case?
>
> > > > Thanks in advance,
> > > > Regards,
> > > > Reddy
>
> > > --
> > > Kostya Vasilyev --http://kmansoft.wordpress.com
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscribe@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
>
>  A N K ! T......

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate