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