Reputation: 691
What is the process behind upgradation of an app in android. Is it replacement of just the Apk or is it something else.
Also
Is it replacement of just the new Apk file (Like reinstalling) or is it updated?
What happens to the database tables which are associated with the older version?
What happens to the shared preferences associated with the older version?
Can anyone also let us know a proper way to simulate this operation before we actually launch it in the market.
Upvotes: 2
Views: 257
Reputation: 72311
database
will be upgraded, so the onUpgrade()
method on your SQLiteOpenHelper
method will be called, so you need to process with care the data here, for example you may not want to delete the entire database and table, and just upgrade maybe specific tables that have changed.ShardePreferences
will not be erased, they will be kept.To simulate this, you can just put an older version of your app on your device, and then install the newer one. This will actually update your application as the Play Store
does, and as Eclipse
does when you re-install an app, that is allready installed on your device/emulator.
Upvotes: 2