Can't save my Preferences after app killed

戏子无情 提交于 2019-12-05 19:28:33

I solved the problem with a soft reset* of my Samsung Galaxy S... can't belive I waisted an all day on a correct code.

Hope this will save some time to others. Marco

*Soft reset: Settings -> Privacy -> Factory data Reset.

There shouldn't be any reason for the prefs not to be saved. The prefs are saved immediately when you perform a change (e.g. checking the checkbox).

Are you sure you didn't simply confuse the key with the value? Your server key is android:key="www.google.com" Maybe that's why you think it is not saved?

I think you need to set android:persistent="true" for the preferences you want to store in SharedPreferences. As given here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!