0

In my I am using Sqlite DB for some functional achievements. For that I made a db in firefox plugin and placed it in the assets folder and copied to the 'SDCARD' because I don't want to delete the app db after uninstalling the application.

Now I needs to get the DB version updated and want to place some column in some tables, But when I use the onUpgrade method of SQLiteOpenHelper, the method never gets called. even I increased the DB version of my app as well as my app version. What could be the reason behind this?

Does that not working because I am creating my db in SDCARD not in app directory?

skygeek
  • 1,548
  • 11
  • 24
  • Mind posting the code for your class that extends `SQLiteOpenHelper`? – Ben Pearson Mar 04 '14 at 13:47
  • 1
    Consider adding some details to your question. For example, your sqlite open helper constructor and how you are opening `SQLiteDatabase`. Also, I want all app data gone when I uninstall it. Your concerns as a developer do not overrule my concerns as a user. – laalto Mar 04 '14 at 13:47
  • SQLiteOpenHelper does not support opening databases from the sdcard. While it is possible to override the get{Readable|Writeable}Database() method in you implementation or do some other strange things, this will not result in the on* Methods to be called. – Marvin W Mar 04 '14 at 14:02
  • Follow this link for answer http://stackoverflow.com/questions/14332462/database-onupgrade-method-is-never-called – skygeek Mar 05 '14 at 09:03

0 Answers0