2

I'm making an iOS app using PhoneGap. Is there a way to store the webSQL database created by the app on the SD card, uninstall the app, install it again and then retrieve the database correctly with all the previous information that was there before uninstallation?

Since I haven't tried anything yet, I'm not expecting people to give me code as an answer, I'm just wondering what I could use to achieve this? Would it be PhoneGap's File API? If so, how would I specify where to save the db?

Mohd
  • 313
  • 1
  • 4
  • 16
  • have u found answer for this? http://stackoverflow.com/questions/35981130/is-it-possible-to-replace-existing-sqlite-db-file-with-other-db-file-from-direct I have a same requirement but not getting any answers and code – user3107283 Mar 18 '16 at 11:34

1 Answers1

0

Here is some code to dump the content of a webSQL database to a file as JSON, and to read the JSON to repopulate the database: http://teusink.blogspot.com/2013/05/backup-and-restore-websql-database-with.html

I haven't tried it but it could at least give you some pointers as to how to achieve it.

user276648
  • 6,018
  • 6
  • 60
  • 86