Skip to content

Instantly share code, notes, and snippets.

@lamalex
Created May 24, 2013 19:31
Show Gist options
  • Save lamalex/5645954 to your computer and use it in GitHub Desktop.
Save lamalex/5645954 to your computer and use it in GitHub Desktop.
takePicture: function() {
var options = {
quality: 50,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: 1,
encodingType: 1
};
navigator.camera.getPicture(
function(imageData) {
navigator.notification.alert(imageData, null, "great news!", '\'Aight');
},
function(message) {
navigator.geolocation.getCurrentPosition(
function(position) {
navigator.notification.alert(position.coords.latitude, null, "baaad news", 'OK');
},
function(message) {
alert(message);
}
);
},
options
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment