0

I have a Phonegap / Cordova application which needs to bundle a SQLite database (about 7mb). I then wish to access that database using Javascript (jQuery mobile).

How do I approach this? I don't want to use HTML5 local storage as it does not have enough capacity and will be deleted after use. It has to be the native Android SQLite plus the javascript connectivity.

Thanks in advance!

Nick

2 Answers 2

0

Last time I checked several months ago, it was imposible. Here is a similar question JavaScript sqlite, and this other one might be more useful http://luthfihariz.wordpress.com/2011/10/23/android-sqlite-phonegap-jquerymobile/

Sign up to request clarification or add additional context in comments.

Comments

0

Update I just found that it is possible to create SQLite database using phonegap, Read more here http://docs.phonegap.com/en/1.4.1/phonegap_storage_storage.md.html#Database

 window.openDatabase(name, version, display_name, size);

Hello you can make use of WebView, and use addJavascriptInterface(Object, String), this lets you use java methods from javascript. You can write methods to store, retrieve in java and later access them via javascript.

1 Comment

this is not native SQLite but the WebSQL which is based on SQLite but not identical.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.