lundi 12 janvier 2015

Accessing SQLite Database Through Assets

Im trying to use ionic with the SQLite plugin (http://ift.tt/1gnjybT) and I was able to create and use a database, but in my app i need a prepopulated database. I see methods of achieving this by placing the database in the platforms/android/assets folder in the ionic project, and then copying it, on the first android run, to the "correct location". My question is, why is it needed to copy it to another location? why cant I just access it from the assets folder which the application creates? If it was an image, i wouldnt need to change its place either, i would use it from the assets, so why not the db too?


Aucun commentaire:

Enregistrer un commentaire