This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background:#222 none repeat scroll 0 0; | |
color:#666; | |
font-family:Helvetica; | |
font-size:72%; | |
line-height:1.5em; | |
margin:0; | |
border-top:1px solid #393939; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta name="viewport" content="width=320; user-scalable=yes" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>PhoneGap</title> | |
<script type="text/javascript" charset="utf-8" src="phonegap-1.1.0.js"></script> | |
<script type="text/javascript" charset="utf-8" src="video.js"></script> | |
<script type="text/javascript"> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadTweets() { | |
var request = new XMLHttpRequest(); | |
request.open("GET", "http://search.twitter.com/search.json?q=phonegap", true); | |
request.onreadystatechange = function() {//Call a function when the state changes. | |
if (request.readyState == 4) { | |
if (request.status == 200 || request.status == 0) { | |
var tweets = JSON.parse(request.responseText); | |
var data = "<table cellspacing='0'>"; | |
var tableClass; | |
for (i = 0; i < tweets.results.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (localStorage.getItem("dbCreated") != true) { | |
html5sql.openDatabase("ScratchDB", "Scratch DB", 3 * 1024 * 1024); | |
var request = new XMLHttpRequest(); | |
request.open("GET", "file:///android_asset/www/create.sql", true); | |
request.onreadystatechange = function(){ | |
if (request.readyState == 4) { | |
if (request.status == 200 || request.status == 0) { | |
html5sql.process(request.responseText, | |
function(){ | |
console.log("Win!"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE example (id INTEGER PRIMARY KEY, data TEXT); | |
INSERT INTO example (data) VALUES ('First'); | |
INSERT INTO example (data) VALUES ('Second'); | |
INSERT INTO example (data) VALUES ('Third'); | |
CREATE TABLE example2 (id INTEGER PRIMARY KEY, data TEXT); | |
INSERT INTO example2 (data) VALUES ('First'); | |
INSERT INTO example2 (data) VALUES ('Second'); | |
INSERT INTO example2 (data) VALUES ('Third'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fileTransfer = new FileTransfer(); | |
fileTransfer.download( | |
"http://developer.android.com/assets/images/home/ics-android.png", | |
"/sdcard/ics.png", | |
function(entry) { | |
console.log("download complete: " + entry.fullPath); | |
}, | |
function(error) { | |
console.log("download error source " + error.source); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta name="viewport" content="user-scalable=no" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>PhoneGap</title> | |
<style type="text/css"> | |
@media all and (min-width: 801px) { | |
#wrapper { | |
width: 80%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta name="viewport" content="width=320; user-scalable=no" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>PhoneGap Config Example</title> | |
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8"> | |
<script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta name="viewport" content="width=320; user-scalable=yes" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>PhoneGap</title> | |
<script type="text/javascript" charset="utf-8" src="cordova-1.5.0.js"></script> | |
<script type="text/javascript" charset="utf-8" src="video.js"></script> | |
<script type="text/javascript"> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta name = "viewport" content = "user-scalable=no,width=device-width" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Test Page</title> | |
<script type="text/javascript" charset="utf-8" src="cordova.android.js"></script> | |
<style type="text/css"> | |
* { | |
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); |