Reputation: 141
I am new to windows 7 phonegap. i want to store and retrieve data using native application.I don't know how to store and display the retrieved data from native to phonegap(HTML)page.
Thanks in advance.
Upvotes: 2
Views: 1438
Reputation: 31
As answered by Timo Rehl, you can use an sqlite implementation from codeplex to implement the sqlite component and then create a PhoneGap plugin on top of it.
As a matter of fact, I've developed such a plugin (for cordova 3) that enables you to use Web SQL Database on Windows Phone (7 and 8) as if it was natively implemented : https://github.com/Smile-SA/cordova-plugin-websqldatabase.
A prototype using this plugin is available at https://github.com/Smile-SA/cordova-plugin-websqldatabase-proto.
This plugin uses a forked version (to solve some bugs) of the sqlite implementation from codeplex. The fork is available in the same github repository.
Upvotes: 0
Reputation: 56
Ok, Im late with my answer, but I have an answer to the question:
PhoneGap supports Sqlite, no question. But Windows Phone doesn't Support Sqlite, so that Phonegap exclude the "Web SQL Storage" Interface for Windows platforms (see supported platforms in Phonegap API documentation online).
There is a Little bit uncommon way to reach the Goal. You can use a sqlite implementation from codeplex to Support sqlite with your Windows mobiles: http://sqlitewindowsphone.codeplex.com/releases
I did'nt tested with Phonegap, so I cant't give a guarantee of that, but it looks fine for me.
Upvotes: 4
Reputation: 541
Have a look at this: Phonegap Storage (provides access to the devices storage options)
To see console.log messages in visual studio's output window:
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript">
document.addEventListener("deviceready",onDeviceReady,false);
// called when device ready event fires
function onDeviceReady()
{
console.log("You should see this message in Visual Studio's output window.");
}
</script>
Upvotes: 1