How to reset Android application states when updating / updating

I have applications already published on the market. When users download the new version, I want the application to clear all its previous states (SharedPreferences, SQLite schema ...). This will be equivalent to uninstalling the application, and then install the new version . I read various solutions for

SharedPreferences Android: How to reset FirstRun SharedPreferences when updating my application?

SQLiteOpenHelper SQLiteOpenHelper onUpgrade () Confusion Android

But I want one solution for all these problems. Just wondering, is it possible to run "clean states" when updating an application from the market?

+4
source share

All Articles