SharedPreferences class allows to save application data in simple type (boolean, String, etc.) formats.
Normally they are not removed and they are supposed to persi
Sharedpreferences will clear when you clear application data from Application manager by force.
If you want to clear your application Sharepreference data, then you can use:
PreferenceManager.getDefaultSharedPreferences(context).edit().clear().commit();
Go to Setting->Application setting->Application->Clear data and force data will clear all the data of application (sqlitedatabase and shared preferences) are removed.
when you do clear data from the device applications manager or when you uninstall your application, the SharedPreference's file is deleted.
SharePreferences are stored inside
/data/data/packagename/shared_prefs/prefsname.xml
unless you have the android:allowBackup="true" in your manifest. In that case they might be restored.