How to reset an Android application states when upgrading / updating

别等时光非礼了梦想. 提交于 2019-12-07 07:42:52

问题


I have applications already published on the market. When users download the new version, I want the application to clean all its previous states ( SharedPreferences , SQLite schema ... ). That'd be equivalent to uninstall the application first then install the new version. I read various solutions to

SharedPreferences Android: How to reset FirstRun SharedPreferences when my app is updated?

SQLiteOpenHelper SQLiteOpenHelper onUpgrade() Confusion Android

But I want one solution to all these problems. Just wonder if it is possible to trigger a "clean states" when the application is being upgraded from the market ?

来源:https://stackoverflow.com/questions/7076622/how-to-reset-an-android-application-states-when-upgrading-updating

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