Skip to content

Instantly share code, notes, and snippets.

@jos3000
Created October 11, 2010 11:13
Show Gist options
  • Save jos3000/620374 to your computer and use it in GitHub Desktop.
Save jos3000/620374 to your computer and use it in GitHub Desktop.
I/ActivityManager( 53): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.phonegap.www/.www }
I/ActivityManager( 53): Start proc com.phonegap.www for activity com.phonegap.www/.www: pid=330 uid=10026 gids={1006, 3003, 1015}
I/System.out( 330): Native Geolocation not supported - we're ok
I/System.out( 330): PluginManager()
I/System.out( 330): PluginManager.addPlugin(com.phonegap.Storage)
I/ActivityManager( 53): Displayed activity com.phonegap.www/.www: 1753 ms (total 1753 ms)
I/System.out( 330): PluginManager.exec(Device, getDeviceInfo, Device0, [], true)
I/System.out( 330): PluginManager.addPlugin(com.phonegap.Device)
I/System.out( 330): -- returning result: { status: 0, message: {"platform":"Android","phonegap":"pre-0.92 EDGE","version":"1.6","name":"google_sdk"} }
I/System.out( 330): PluginManager.exec(Storage, openDatabase, Storage1, ["Test","1.0","shed",65536], true)
I/System.out( 330): PluginManager.exec(Storage, executeSql, Storage2, ["CREATE TABLE IF NOT EXISTS example (id NVARCHAR(32) UNIQUE PRIMARY KEY, value TEXT, timestamp REAL)","undefined",0], true)
D/dalvikvm( 330): GC freed 3908 objects / 272000 bytes in 101ms
I/System.out( 330): PluginManager.exec(Storage, executeSql, Storage3, ["INSERT INTO example (id, value, timestamp) VALUES ('AAA', 'First row', 123456790)","undefined",1], true)
I/System.out( 330): PluginManager.exec(Storage, executeSql, Storage4, ["INSERT INTO example (id, value, timestamp) VALUES ('BBB', 'Second row', 123456791)","undefined",1], true)
I/System.out( 330): PluginManager.exec(Storage, executeSql, Storage5, ["SELECT * FROM example",[],2], true)
D/SQLite Storage:( 330): no such table: example: , while compiling: SELECT * FROM example
D/WebCore ( 330): Console: JSCallback Error: SyntaxError: Parse error line: 561 source: file:///android_asset/www/phonegap.js
D/WebCore ( 330): Console: JSCallback Error: SyntaxError: Parse error line: 561 source: file:///android_asset/www/phonegap.js
D/WebCore ( 330): Console: JSCallback Error: SyntaxError: Parse error line: 561 source: file:///android_asset/www/phonegap.js
D/WebCore ( 330): Console: JSCallback Error: SyntaxError: Parse error line: 561 source: file:///android_asset/www/phonegap.js
<!DOCTYPE html>
<html>
<head>
<title>Android 1.6 DB Test</title>
<script src="phonegap.js"></script>
</head>
<body>
<h1>Android 1.6 DB Test</h1>
<div style="background-color: #888" id="output"></div>
<script>
var testDB = function(){
var db = openDatabase("Test", '1.0', 'shed', 65536);
db.transaction(function(tx) {
tx.executeSql("CREATE TABLE IF NOT EXISTS example (id NVARCHAR(32) UNIQUE PRIMARY KEY, value TEXT, timestamp REAL)");
});
db.transaction(function(tx) {
tx.executeSql("INSERT INTO example (id, value, timestamp) VALUES ('AAA', 'First row', 123456790)");
tx.executeSql("INSERT INTO example (id, value, timestamp) VALUES ('BBB', 'Second row', 123456791)");
});
db.transaction(function(tx) {
tx.executeSql("SELECT * FROM example", [], function (tx, results) {
var len = results.rows.length;
var text = "example table: " + len + " rows found.<br>";
text = text + "<table border='1'><tr><td>Row</td><td>Data</td></tr>";
for (var i=0; i<len; i++){
text = text + "<tr><td>" + i + "</td><td>" +
results.rows.item(i).id + ", " + results.rows.item(i).value + "</td></tr>";
}
text = text + "</table>";
document.getElementById('output').innerHTML = text;
});
});
}
document.addEventListener("deviceready", testDB, false);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment