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.
databasewill be upgraded, so theonUpgrade()method on yourSQLiteOpenHelpermethod 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.ShardePreferenceswill 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 Storedoes, and asEclipsedoes when you re-install an app, that is allready installed on your device/emulator.