How can I read the preferences XML file?

240 views Asked by At

How can I read the preferences.xml file in Android? I'd like to read and parse the XML file to collect the names of all the string resources that are used.

1

There are 1 answers

1
SAM On

Like this you can get the value from SharedPreferences

  SharedPreferences sharedPreferences=context.getSharedPreferences(sharedpre_name,Context.MODE_PRIVATE);
            sharedPreferences.getInt("KEY", defaultvalue);