In my application I retrieve data via bluetooth from another device and store this data into a (parcelable) class. I like the user to be able to change the data via an PreferenceActivity. The communication works and the PreferencesScreens are built.
I tried to assign my object to every Preference and overwrite the getPersistedString(),… functions to store the data. This attempt wasn’t successfull. Do I have to implement a SharedPreferences class? Or what is the correct way to handle this problem ?
Thank you very much.
The way I solved the problem was to register a
OnPreferenceChangeListeneron everyPreferenceand dosetPersistent(false). Then I can persist the data in theOnPreferenceChangeListenerto my backend.