Does updating app clear sharedpreferences or remove alarms set by the app?

与世无争的帅哥 提交于 2019-12-01 05:40:11

Normally, the SharedPreferences(as well as other user data) will be kept during the update process, but sometimes, due to some "unknown" problem, the data may get lost, and I guess it is out of your control. So, you can simply believe that the SharedPreferences will be kept.

As for alarms, how did you set these alarms? If you set them in code, it should be 100% ok as long as you set them right in code.

Of course, the best way to test is install your updated app on your device before you push it up to the market. First, you should install your market version of app on your phone, then export your app with your market keystore on your local computer, finally, install the exported version on your phone(the installer should inform you about the update). And you can check if these settings are still there.

While exporting, the most important thing is to make sure you are using the same keystore as you use with the market version of app.

Hope this will help you.

SharedPreferences are stored and will survive updating the application. About the alarms I am not sure, sorry.

For testing your update simply install your market version on your device, set up your stuff (alarms, sharedprefs) like a normal user would do and just install the apk on your phone that you would upload to the market (signed apk!). The installing should be the same as the update your user will get...

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