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
# PhoneGap Build | |
https://build.phonegap.com | |
# Slides | |
http://speakerdeck.com/u/alunny/p/anatomy-of-an-app | |
# Alex Payne: Shortchanging Your Business with User-Hostile Platforms | |
http://al3x.net/2011/01/15/user-hostile-platforms.html | |
# Tim Bray: Three Mobile Software Rules |
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 crypto = require('crypto'), | |
request = require('request'), | |
uri = 'https://queue.amazonaws.com/accountnumber/queuename', | |
qs = { | |
'AWSAccessKeyId': 'accesskey', | |
'Action': 'ReceiveMessage', | |
'AttributeName': 'All', | |
'Expires': '2012-04-22T22:52:43Z', | |
'MaxNumberOfMessages': '5', | |
'SignatureMethod': 'HmacSHA256', |
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
<html> | |
<h1>Confirmation Test</h1> | |
<script src="phonegap.js"></script> | |
<script> | |
// process the confirmation dialog result | |
function onConfirm(button) { | |
alert('You selected button ' + button); | |
} |
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
<html> | |
<h1>Playing Audio</h1> | |
<button onclick="playAudio('brobob.mp3')">Play Some Audio</button> | |
<script src="phonegap.js"></script> | |
<script> | |
function playAudio(src) { | |
if (device.platform == 'Android') { | |
src = '/android_asset/www/' + src; | |
} |
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> | |
<h1>ONLINE - OFFLINE TEST</h1> | |
<script src="phonegap.js"></script> | |
<script> | |
document.addEventListener('online', function (e) { | |
alert('online event fired'); | |
}, false) | |
document.addEventListener('offline', function (e) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<widget xmlns = "http://www.w3.org/ns/widgets" | |
xmlns:gap = "http://phonegap.com/ns/1.0" | |
id = "com.alunny.chilling" | |
version = "1.0.0"> | |
<name>ChildBrowser on 1.5.0</name> | |
<feature name="http://plugins.phonegap.com/ChildBrowser/2.0.1" /> | |
<feature name="http://api.phonegap.com/1.0/network" /> |
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
// use with http://defunkt.io/dotjs/ | |
$('.unread_count') | |
.hide() |
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
// ignore this | |
// console.log('Warning: use of "phonegap.js" is deprecated in 1.5.0'); | |
console.log('No, it\'s not'); | |
// console.log('Please see https://build.phonegap.com/cordova for details'); | |
console.log('Don\'t do that. There\'s nothing there'); | |
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
# for good measure | |
@daily /etc/init.d/weinred restart |
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
<html> | |
<body> | |
<form onsubmit="return saveText()"> | |
<label for="name">Name</label><br> | |
<input id="name" /><br> | |
<label for="desc">Description</label><br> | |
<input id="desc" /><br> | |
<input type="submit" value="Save" /> |