Skip to content

Instantly share code, notes, and snippets.

@imgly-gists
Last active June 8, 2017 13:47
Show Gist options
  • Save imgly-gists/7f301c6842823a1b40c87cc0ad200a47 to your computer and use it in GitHub Desktop.
Save imgly-gists/7f301c6842823a1b40c87cc0ad200a47 to your computer and use it in GitHub Desktop.
onDeviceReady: function() {
selectImageBtn = document.getElementById('js-selectImageBtn');
selectImageBtn.addEventListener('click', function() {
window.imagePicker.getPictures(
function(results) {
let imageURI = results[0];
PESDK.present(
function(result){ alert('PESDK result: ' + JSON.stringify(result)); },
function(error){ alert('PESDK error: ' + error); },
{ path: imageURI }
);
}, function (error) { console.log('Error: ' + error); },
{ maximumImagesCount: 1 }
);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment