Reputation: 839
I published an application that stores data in a local database.
Now I have to publish an update to this application to fix some little bugs, but I am afraid that downloading and installing the update will delete the local database associated with the previous version.
I would like to know how the update system works. Will installing an update completely delete all the apk, files, databases associeted with the previous version?
If so, how can I avoid this in my code?
I want to add one more table in that db and also the user data can't delete.
thanks in advance..
Upvotes: 3
Views: 444
Reputation: 26271
Unless you initiate a manipulation(update/delete/etc) to the existing data, it will be unchanged. isn't that nice ;)
Upvotes: 0
Reputation: 5961
Will installing an update completely delete all the apk, files, databases associeted with the previous version?
No. Only uninstalling or clearing app data will delete your user's data. Allowing the Market to install the update as an upgrade (without uninstalling first) will preserve all your data.
Upvotes: 3
Reputation: 1404
You can find it here: How to update table schema after an app upgrade on Android?
your userdatabase will be unchanged by an update unless you implement the onUpgrade handler.
Upvotes: 1