I’m referring to SearchableDictionary v2 sample code in Adroid.
In this example, in the content provider, the database is destroyed and recreated when a new database version is detected with onUpgrade method.
But This method start only when search is invoked.
Now i’d like to have an onUpgrade invoked when the application is started for the first time after application upgrade.
So how can i have onUpgrade works in the main activity if the onUpgrade method is implemented in a different activity?
Thanks for your help
I’m referring to SearchableDictionary v2 sample code in Adroid. In this example, in the
Share
simply create update method in your contentProvider as Barak suggested there you will only open and close db which will automatically trigger onupgrade Use contentResolver in mainActivity to call that method and done 🙂