-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use copyFromAssets #93
Comments
@ncham you should look at the application starter referenced in the Readme to understand how to use this plugin before starting your development.
and then you create a connection to one of the db
and the open the db
and then do whatever methods
That is it. Hope this will help you to start |
I implemented it according to the documentation and the return value of Return value of After further investigation |
@ncham
and it should work |
Registered the plugin but still the same result. The version I'm using is 2.9.13 and developing with ionic and angular. I guess |
@ncham that not possible so show me your package.json file and the MainActivity.java file. Did you run this
|
Yes, I did run those commands. package.json
MainActivity.java file
|
@ncham It should work if you did run all the commands. i started from scratch a new application this morning did all the steps and it works. see |
Perfect, I tested your code and it's working. Original
Changed to
Then it worked. Thanks for the support. Once the .db file is copied to the device, is it ok to delete the file? |
@ncham if the db is part of your asset and is required as initial db to start your app you have to keep it and when the app starts you check if the db exists, if not you copy it from the asset and the open it otherwise you open it Voilà. I close the issue and i will remove the example app from github |
Thanks. |
I downloaded sqlite database from server. |
@binaryking979 you must use the downloadFromHttp method of the plugin it will download the database in the right location (database folder of your app |
Thank you for you help. |
@binaryking979 sorry i mean getFromHTTPRequest |
I'm new to ionic and sqlite, my requirement is to copy prepopulated .db file to android device.
I did read the documentation but bit confused using this library, about the connection and copyFromAssets() function.
Could anybody please give me a brief idea about this.
The text was updated successfully, but these errors were encountered: