Last active
June 8, 2017 13:47
-
-
Save imgly-gists/7f301c6842823a1b40c87cc0ad200a47 to your computer and use it in GitHub Desktop.
This file contains 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
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