My app uses SharedPreferences (with the help of a PreferenceActivity) to store all settings. But sometimes all settings are deleted and all values are set back to default. M
I found out the reason why the settings disappear: If two processes write data to SharedPreferences, it can happen that all SharedPreferences are reset to default values. In my case all settings are cleared when the service write the first data to SharedPreferences.
Now, the service provides only read access to the SharedPreferences. The settings that are accessed by both processes writing are stored in a database.