Reputation: 318
I am trying to update my appliaction from an external URL. If there is any change in the version file on the specific URL , the application checks for it and starts downloading the latest uploaded APK from url.
After downloading the application the new apk starts installing and says it will replace the existing app in the phone.
My question : In this scenario, the complete database containing the data of the previous app gets cleared or not ?
Upvotes: 0
Views: 95
Reputation: 180080
When an app is upgraded, any data files created by the app are not affected.
When SQLiteOpenHelper
detects that the database file's version is smaller than the version declared by your app, it calls onUpgrade
.
Upvotes: 1