How to reset an Android application states when upgrading / updating
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 ?
精彩评论