4

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 ?

Community
  • 1
  • 1
Raymond Chenon
  • 11,482
  • 15
  • 77
  • 110
  • The "onUpgrade" method is your solution you can clean all the db and create it again, I use it it works really good with ormLite – user2137817 Apr 30 '14 at 15:45

0 Answers0