Skip to content
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

Pre-populated sqlite db on android developer app #10

Closed
mamcgree opened this issue Feb 9, 2016 · 4 comments
Closed

Pre-populated sqlite db on android developer app #10

mamcgree opened this issue Feb 9, 2016 · 4 comments

Comments

@mamcgree
Copy link

mamcgree commented Feb 9, 2016

Greetings Chris..
I needed to open a pre-populated sqlite db in android I added your cordova-sqlite-ext and it worked fine when I compiled it for android. I added it to the "Andoid Developer App" but it will not open the existing db in the www folder using
var db = window.sqlitePlugin.openDatabase({name: "my.db", createFromLocation: 1});
It assumes it's not there and creates a new one in the databases folder of the Andoid Developer App. Do have an suggestions.
Thank you in advance for your time..
Cheers..
Groetjes... (my wife is from Eindhoven)..

@brodycj
Copy link
Owner

brodycj commented Feb 9, 2016

Hi @mamcgree,

To be honest I have never really worked with the PhoneGap Android Developer App. Can you try creating a plain Cordova app using the Cordova CLI and start with a very simple test?

The automatic test suite includes spec/www/spec/pre-populated-db-test.js which verifies that the database file is not overwritten if it is already present.

Thanks!

@mamcgree
Copy link
Author

mamcgree commented Feb 9, 2016

Hi Chris..

Thanks for the quick response.. I'm new to phonegap. I compiled the
developer app with your plugin, which allows the sqlite to function, but
it doesn't handle and existing db. Developer app does not currently
handle sqlite. I will poke around but I am not very experienced in this
area.

Thanks again for your quick response..

Cheers..

On 16-02-09 02:59 PM, Chris Brody wrote:

Hi @mamcgree https://github.com/mamcgree,

To be honest I have never really worked with the PhoneGap Android
Developer App. Can you try creating a plain Cordova app using the
Cordova CLI and start with a very simple test?

The automatic test suite includes
spec/www/spec/pre-populated-db-test.js which verifies that the
database file is not overwritten if it is already present.

Thanks!


Reply to this email directly or view it on GitHub
#10 (comment).

@jdnichollsc
Copy link

My last template have an example 👯 https://github.com/jdnichollsc/Ionic-Starter-Template

@brodycj
Copy link
Owner

brodycj commented Mar 11, 2016

Closing, this will be handled in storesafe/cordova-sqlite-storage#427

@brodycj brodycj closed this as completed Mar 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants