How To Eliminate Preferences Values Database?

by Massimo Barbera » Fri, 19 Dec 2008 03:03:38 GMT

Sponsored Links
 Dear all,

I have a PreferenceActivity whose structure is described in a
preferences.xml file:
we know this leads to construct a GUI interface trough which you can
change the value of our preferences

For testing purposes I have changed the value of one preference
(android:key="my_value") from a class external to my
PreferenceActivity, trough editor.putBoolean("my_value", value);

now each time the PreferenceActivity is started, I have an exception.

How can I reset "my_value" ?

Thanks in advance!


How To Eliminate Preferences Values Database?

by Mark Murphy » Fri, 19 Dec 2008 03:37:38 GMT


Manually, you can reset it by deleting the preferences data in your 
emulator -- it's an XML file found in:


You can use adb shell, DDMS's File Explorer, or the like to get rid of 
the file.

Mark Murphy (a Commons Guy) 

Android Training on the Ranch! -- Mar 16-20, 2009 


Sponsored Links

How To Eliminate Preferences Values Database?

by Xavier Mathews » Fri, 19 Dec 2008 04:06:12 GMT

 Yea Delete your prefrence data... be sure that the xml can not convert
to rss! Then delete the older file from the explorer.

Xavier A. Mathews
Student/Browser Specialist/Developer/Web-Master
Client Based Tech Support Specialist
Hazel Crest Illinois
"Fear of a name, only increases fear of the thing itself."


How To Eliminate Preferences Values Database?

by Michael » Fri, 19 Dec 2008 05:13:08 GMT


You realize that RSS is just an XML file with a particular schema, yes?

How To Eliminate Preferences Values Database?

by Massimo Barbera » Fri, 19 Dec 2008 18:03:24 GMT

 Guys, I have used the DDMS's File Explorer to get rid of preferences
XML and it works fine.


Other Threads

1. Orientation sensor problem.

Hi all!

I've been trying to get a simple test app working to show me the
orientation of the phone. The code I've used is below:

public class Main extends Activity implements SensorEventListener {

        SensorEventListener listener;
        TextView mainText;
        SensorManager sensorMan;

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {


        mainText = (TextView)this.findViewById(;

        sensorMan =

        public void onAccuracyChanged(Sensor sensor, int accuracy) {
                // TODO Auto-generated method stub


        public void onSensorChanged(SensorEvent event) {

                float[] values = event.values;
                                "AngleX: "+ values[0]  +
                                "AngleY: "+ values[1] +
                                "AngleZ: "+ values[2] );

So from what I've seen everywhere, the angles should range somewhere
between -360 to 360 or -180 to 180. Something like that anyway. But
what I'm receiving when testing on my T-Mobile G2 is completely

AngleX: -10 to 10
AngleY: -10 to 10
AngleZ: -11 to 11

Initially I assumed this was radians but it's outside of -PI to PI
(i.e. it'd be > 360 degrees which is contrary to all the blog posts
I've seen.

If anyone else has heard of this or seen this problem I'd love to know
what you did!

Any information or ideas are welcome!

Thanks a lot!



2. Job Opening for Mobile Developer in Rockland County, NY - Northern NJ / Westchester / NYC

We need one or more of the following platforms: iPhone, Android,

For more info see: or


3. OnSharedPreferenceChangeListener never receives callback

4. Switching Signing Keys

5. Debugging with DDD

6. Standalone java code is not working in the same way from android.

7. Implementing Filterable Cursor Adapter: How to I invoke/refresh filter?