Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Created November 28, 2008 22:28
Show Gist options
  • Save brianleroux/30119 to your computer and use it in GitHub Desktop.
Save brianleroux/30119 to your computer and use it in GitHub Desktop.
PhoneGap Code Samples
function accelerometer() {
$('accel').innerHTML = "accel: " + accelX + " " + accelY + " " + accelZ;
setTimeout(updateAccel, 100);
}
function takePhoto() {
var photo = gap:takePhoto();
return photo;
}
function location(lat, lon) {
$('lat').innerHTML = "latitude: " + lat;
$('lon').innerHTML = "longitude: " + lon;
}
function vibrate() {
gap:vibrate();
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment