storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API
Other
2.15k stars 715 forks source link

Copy database (backup) #454

Open htsnet opened 8 years ago

htsnet commented 8 years ago

I have an app created with XDK intel using this plugin in order to manage a database. It is created when the user start the app for the first time. The app runs on Android and iOS. I used location: 2 in openDatabase command.

I want now to do a function to make a copy of this database to Dropbox, but I can´t find the file...

I saw some tickets here, but no success with solutions.

Did someone has a solution or tip for that? Thanks a lot.

htsnet commented 8 years ago

+1

brodycj commented 8 years ago

For iOS: since you use location: 2 you should look in the Documents subdirectory of your application's data directory.

For Android, you would look in the databases subdirectory. Note that this is not visible outside of your application.

I think you would use cordova-file-transfer to upload the file.

For more information you may want to ask on Stack Overflow.