I created an Android application which, check at startup if there is a new version of application. If yes, the application download the new apk file and over-install new apk. My application use the sqlite db. But this db, from one version to other can change. I think I have to use the method:
onUpgrade()
but I don't know exactly how to use it.
When I start the application I use this code for crete database(if not exists):
DbHelper mDHelper = new DbHelper(context, DB_NAME, null, DB_VERSION)
What should I change if I want use onUpgrade()
method?
And when do I have to call it?