Skip to content

Instantly share code, notes, and snippets.

@lamalex
Created May 24, 2013 19:31
Show Gist options
  • Select an option

  • Save lamalex/5645954 to your computer and use it in GitHub Desktop.

Select an option

Save lamalex/5645954 to your computer and use it in GitHub Desktop.

Revisions

  1. Alex Launi created this gist May 24, 2013.
    24 changes: 24 additions & 0 deletions app.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    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
    );
    }